Skip to content

Instantly share code, notes, and snippets.

@rayning0
Created September 24, 2013 11:27
Show Gist options
  • Save rayning0/6683406 to your computer and use it in GitHub Desktop.
Save rayning0/6683406 to your computer and use it in GitHub Desktop.
Alien Sandwich: Create a numbered list that contains instructions for making a peanut butter and jelly sandwich, for an alien. The alien is positioned in front of a table with a plate, a knife, a jar of jelly, a jar of peanut butter, and a loaf of bread.
Coordinates of peanut butter, jelly, plate, knife, bread = [a bunch of numbers separated by commas]
Get (stuff)
Move free arm to coordinates of stuff
Lower arm
Close hand around stuff
Raise arm
end
Put (stuff) down
Lower arm carrying stuff
Open hand
Raise arm
end
Open lid
Move free arm to lid
Close free hand around lid
While (lid not off)
Turn hand counterclockwise 90 degrees
end
Put (lid) down
end
Close lid
Find lid and get coordinates
Get (lid)
Move lid over stuff
Lower arm
While (lid not closed)
Turn hand clockwise 90 degrees
end
end
Wipe knife on (stuff)
Move knife over stuff
Lower arm
Move arm to left edge of stuff
Lower knife
Move arm to right edge of stuff
Raise knife
Raise arm
end
Put (stuff) back
Move arm with stuff to coordinates of stuff
Put (stuff) down
end
Spread (stuff) on bread slice
Get (stuff)
Open lid
Get (knife)
Wipe knife on (stuff)
Put (stuff) down
Close lid
Move arm to plate
Wipe knife on (bread)
Put (knife) back
end
Put slice of bread on plate
Get (bread loaf)
Open loaf
Get 1 slice of bread
Move arm to plate
Drop slice on plate
Close loaf
Put (loaf) back
end
Make sandwich of (peanut butter, jelly)
Put slice of bread on plate
Spread (peanut butter) on bread slice
Spread (jelly) on bread slice
Put slice of bread on plate
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment