Guest User

Untitled

a guest
Jun 15th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1.         self.potential_move = self.position.getNewPosition(self.direction,self.speed)
  2.         if self.room.isPositionInRoom(self.potential_move):
  3.             self.setRobotPosition(self.potential_move)
  4.             if not self.room.isTileCleaned(self,self.potential_move):
  5.                 self.room.cleanTileAtPosition(self.position)
  6.         else:
  7.             self.setRobotDirection(self.getRandomDirection())
Advertisement
Add Comment
Please, Sign In to add comment