Пример #1
0
 def dragon_collide_platform(self):
     arena = Arena((100, 100))
     dragon = Dragon(arena, (0, 0))
     platform = Platform(arena, (30, 0), 2, 1)
     dragon.move()
     dragon.collide(platform)
     self.assertTrue(dragon.position() == (10, 0, 20, 20))
Пример #2
0
 def dragon_move_left(self):
     arena = Arena((100, 100))
     dragon = Dragon(arena, (50, 0))
     dragon.go_left()
     dragon.move()
     self.assertTrue(dragon.position() == (47, 0, 20, 20))