Created
August 26, 2013 19:53
-
-
Save dscataglini/6345869 to your computer and use it in GitHub Desktop.
Robot Problem
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
# There are 2 robots placed on an infinitely wide 2 dimensional line. | |
# The robots can’t see each other. | |
# Each robot has 1 marker to the right but 1 of them doesn’t have one on the left. | |
# - unit of distance | |
# ^ marker | |
# ~ indefinite amount of units of distance | |
# ---~---(Robot)---~---^---~---(Robot)---~--^---~--- | |
# Write a program that will make that 2 robots collide using the following Robot Api: | |
# move_left(n) | |
# move_right(n) | |
# at_marker? | |
# stop | |
# this program will be fed to both robots | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment