Ejemplo n.º 1
0
 def test_turn_right(self):
     dirA = [EAST, SOUTH, WEST, NORTH]
     dirB = [SOUTH, WEST, NORTH, EAST]
     for x in range(len(dirA)):
         robot = Robot(dirA[x], 0, 0)
         robot.turn_right()
         self.assertEqual(robot.bearing, dirB[x])
Ejemplo n.º 2
0
 def test_rotate_turn_right(self):
     dirA = [EAST, SOUTH, WEST, NORTH]
     dirB = [SOUTH, WEST, NORTH, EAST]
     for x in range(len(dirA)):
         robot = Robot(dirA[x], 0, 0)
         robot.turn_right()
         self.assertEqual(robot.bearing, dirB[x])
Ejemplo n.º 3
0
 def test_turn_right(self):
     robot = Robot()
     for direction in [EAST, SOUTH, WEST, NORTH]:
         robot.turn_right()
         self.assertEqual(robot.bearing, direction)
Ejemplo n.º 4
0
 def test_turn_right(self):
     robot = Robot()
     for direction in [EAST, SOUTH, WEST, NORTH]:
         robot.turn_right()
         self.assertEqual(robot.bearing, direction)