View Single Post
  #2 (permalink)  
Old 07-06-2007, 09:50 PM
JavaBean's Avatar
JavaBean JavaBean is offline
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
We need the Robot class. What are the capabilities (methods) of a robot?

Basically, you will need to do four things at each time step. You can do that in a while loop:

1. Check if the robot can pick things. If robot can pick things, pick them.
2. Check if there is a wall in front of the robot. If there is a wall, u-turn.
3. Select a random direction and move a little bit.
4. Return to step 1.
Reply With Quote