Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.potential_move = self.position.getNewPosition(self.direction,self.speed)
- if self.room.isPositionInRoom(self.potential_move):
- self.setRobotPosition(self.potential_move)
- if not self.room.isTileCleaned(self,self.potential_move):
- self.room.cleanTileAtPosition(self.position)
- else:
- self.setRobotDirection(self.getRandomDirection())
Advertisement
Add Comment
Please, Sign In to add comment