Created
September 27, 2013 03:20
-
-
Save jfriedly/6723725 to your computer and use it in GitHub Desktop.
first-program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Comments! | |
PROGRAM joel IS | |
VARIABLE movecounter = 4 | |
INSTRUCTION default IS | |
IF next-is-not-friend THEN | |
infect | |
END IF | |
WHILE next-is-empty DO | |
move | |
INCREMENT movecounter BY 1 | |
END WHILE | |
END default | |
BEGIN | |
WHILE true DO | |
default | |
END WHILE | |
IF movecounter < 10 THEN | |
turnright | |
ELSE | |
IF next-is-wall THEN | |
turnleft | |
END IF | |
END IF | |
END joel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment