Skip to content

Commands Cheat Sheet

Josh Price edited this page Sep 27, 2021 · 24 revisions
Syntax Arity Capability Description
wait 0 Wait for one time step without doing anything.
noop 0 Do nothing. This is different than 'Wait' in that it does not take up a time step.
selfdestruct 0 Selfdestruct Self-destruct.
move 0 Move Move forward one step.
turn 1 Turn Turn in some direction.
grab 0 Grab Grab an item from the current location.
place 1 Place Try to place an item at the current location.
give 2 Give Give an item to another robot at the current location.
make 1 Make Make an item.
build 2 Construct a new robot.
say 1 Emit a message.
view 1 View a certain robot.
appear 1 Appear Set what characters are used for display.
create 1 Create Create an entity out of thin air. Only available in creative mode.
getx 0 Senseloc Get the current x-coordinate.
gety 0 Senseloc Get the current y-coordinate.
blocked 0 Sensefront See if we can move forward or not.
ishere 1 See if a specific entity is here. (This may be removed.)
random 1 Random Get a uniformly random integer.
run 1 Run a program loaded from a file.
not 1 Logical negation.
==, /=, <=, >=, <, > 2 Compare Binary comparison operators.
- 1 Arith Arithmetic negation.
^, *, /, +, - 2 Arith Binary arithmetic operators.
if 3 Cond If-expressions.
fst 1 First projection.
snd 1 Second projection.
return 1 Return for the cmd monad.
try 2 Try/catch block.
raise 1 Raise an exception.
Clone this wiki locally