def test_move_unavailable_west(self): plateau = Plateau(5, 10) rover = MarsRover(0, 10, 'W', plateau) rover.move() result = plateau.check_move_available(rover) self.assertEqual(result, True)
def rotate_left_from_east(self): plateau = Plateau(30, 30) rover = MarsRover(20, 20, 'E', plateau) rover.rotate_left() self.assertEqual(rover.heading, 'N')
def test_move_forward_west(self): plateau = Plateau(30, 30) rover = MarsRover(20, 20, 'W', plateau) rover.move() self.assertEqual(rover.X, 19)
def test_move_forward_south(self): plateau = Plateau(30, 30) rover = MarsRover(20, 20, 'S', plateau) rover.move() self.assertEqual(rover.Y, 19)
def rotate_right_from_west(self): plateau = Plateau(30, 30) rover = MarsRover(20, 20, 'W', plateau) rover.rotate_right() self.assertEqual(rover.heading, 'N')