Esempio n. 1
0
 def test_moxed_move_second_hover(self):
     p = Plateau(5, 5)
     h = Hover(3, 3, East)
     h.move()
     h.move()
     h.turn_right()
     h.move()
     h.move()
     h.turn_right()
     h.move()
     h.turn_right()
     h.turn_right()
     h.move()
     self.expect_at(h, 5, 1, East)
Esempio n. 2
0
 def test_plateau_boundaries(self):
     plateau = Plateau(5, 5)
     h = Hover(0, 0, North, plateau)
     h.move()
     h.move()
     h.move()
     h.move()
     h.move()
     self.assertRaises(BoundaryReached, h.move)
     h2 = Hover(0, 0, North, plateau)
     h2.turn_right()
     h2.move()
     h2.move()
     h2.move()
     h2.move()
     h2.move()
     self.assertRaises(BoundaryReached, h.move)