Last active
December 11, 2015 01:18
-
-
Save dforsyth/4522022 to your computer and use it in GitHub Desktop.
win
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
| @win | |
| goto << @main | |
| @pull_north | |
| callff << @pull @north 2 | |
| goto << @main | |
| @pull_east | |
| callff << @pull @east 2 | |
| goto << @main | |
| @pull_south | |
| callff << @pull @south 2 | |
| goto << @main | |
| @pull_west | |
| callff << @pull @west 2 | |
| goto << @main | |
| @push_north | |
| callff << @push @north 2 | |
| goto << @main | |
| @push_east | |
| callff << @push @east 2 | |
| goto << @main | |
| @push_south | |
| callff << @push @south 2 | |
| goto << @main | |
| @push_west | |
| callff << @push @west 2 | |
| goto << @main | |
| @move_north | |
| callff << @move @north 2 | |
| goto << @main | |
| @move_east | |
| callff << @move @east 2 | |
| goto << @main | |
| @move_south | |
| callff << @move @south 2 | |
| goto << @main | |
| @move_west | |
| callff << @move @west 2 | |
| goto << @main | |
| # pull_recourses | |
| @do_work | |
| equal << north @cell_resource | |
| iftgoto << @pull_north | |
| equal << east @cell_resource | |
| iftgoto << @pull_east | |
| equal << south @cell_resource | |
| iftgoto << @pull_south | |
| equal << west @cell_resource | |
| iftgoto << @pull_west | |
| # run away | |
| equal << north @cell_empty | |
| iftgoto << @move_north | |
| equal << east @cell_empty | |
| iftgoto << @move_east | |
| equal << south @cell_empty | |
| iftgoto << @move_south | |
| equal << west @cell_empty | |
| iftgoto << @move_west | |
| # push_bots | |
| equal << north @cell_robot | |
| iftgoto << @push_north | |
| equal << east @cell_robot | |
| iftgoto << @push_east | |
| equal << south @cell_robot | |
| iftgoto << @push_south | |
| equal << west @cell_robot | |
| iftgoto << @push_west | |
| goto << @main | |
| @main | |
| callff << @look @north 2 | |
| store north | |
| callff << @look @east 2 | |
| store east | |
| callff << @look @south 2 | |
| store south | |
| callff << @look @west 2 | |
| store west | |
| goto << @do_work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment