Пример #1
0
 def dragon_collide_enemy(self):
     arena = Arena((100, 100))
     dragon = Dragon(arena, (50, 0))
     enemy = Enemy((47, 0), arena)
     dragon.go_left()
     dragon.move()
     dragon.collide(enemy)
     self.assertTrue(dragon.lives() == 2)
Пример #2
0
 def dragon_collide_bubble(self):
     arena = Arena((100, 100))
     dragon = Dragon(arena, (50, 0))
     bubble = Bubble(arena, (47, 0), 0)
     dragon.go_left()
     dragon.move()
     dragon.collide(bubble)
     self.assertTrue(len(arena.actors()) == 1)
Пример #3
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))