Пример #1
0
 def test_ini_gongji(self):
     hero = Hero(name='lilei', hp=100, weight=100, att=100)
     enemy = Enemy(name='elong', hp=1000, weight=20, att=150, def_2=50)
     hero.attack(enemy)
     self.assertEqual(enemy.hp, 750)
Пример #2
0
 def test_ini_gongji(self):
     hero=Hero(name='lilei',hp=100,weight=100,att=100)
     enemy=Enemy(name='elong',hp=1000,weight=20,att=150,def_2=50)
     hero.attack(enemy)
     self.assertEqual(enemy.hp,750)
Пример #3
0
 def test_ini_attack(self):
     hero = Hero(name='casper', hp=100)
     enemy = Enemy(name='sp', hp=100, weight=100)
     hero.attack(enemy)
     self.assertEqual(enemy.hp, 100)
Пример #4
0
 def test_ini_attack(self):
     hero=Hero(name='casper',hp=100)
     enemy=Enemy(name='sp',hp=100,weight=100)
     hero.attack(enemy)
     self.assertEqual(enemy.hp, 100)