Example #1
0
 def move(self, rover):
     """Move the given rover one grid point."""
     current_dir = rover.position[2]
     next_point = MarsRoverInstructions.move_direction(current_dir)
     self.controller.move(rover.id, next_point)
Example #2
0
 def move(self, rover):
     """Move the given rover one grid point."""
     current_dir = rover.position[2]
     next_point = MarsRoverInstructions.move_direction(current_dir)
     self.controller.move(rover.id, next_point)
Example #3
0
 def turn_right(self, rover):
     """Turn the given rover right."""
     current_dir = rover.position[2]
     after_dir = MarsRoverInstructions.right_spin(current_dir)
     self.controller.turn(rover.id, after_dir)
Example #4
0
 def turn_right(self, rover):
     """Turn the given rover right."""
     current_dir = rover.position[2]
     after_dir = MarsRoverInstructions.right_spin(current_dir)
     self.controller.turn(rover.id, after_dir)