Robots and Beacon

Two robots are each standing on a beacon, on a line of infinite length.
They both execute the same code. Write the code to have them collide.
Only use these commands:
SKIPNB - skip the next line of code if not on a beacon
MVR - move right one step
MVL - movel eft one step
JMP - goto label in the code
hint: have both robots move to the right in a loop. if a robot passes a
beacon, double its speed.




Three cases:

|--B--------R--------R-----|

|--R--------R--------B-----|

|--R--------B--------R-----|

Make the robots osciallate ( left to right ) so that the step
increases in each pass.

No comments: