mirror of
https://github.com/swarm-game/swarm.git
synced 2024-09-11 14:46:33 +03:00
13 lines
209 B
Plaintext
13 lines
209 B
Plaintext
def forever : {cmd unit} -> cmd unit =
|
|
\c. force c ; forever c
|
|
end
|
|
|
|
// Wander randomly forever.
|
|
def wander : cmd unit =
|
|
forever {
|
|
b <- random 2;
|
|
turn (if (b == 0) {left} {right});
|
|
move
|
|
}
|
|
end
|