You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
606 B
17 lines
606 B
from game.personnage import Personnage, ClassType
|
|
|
|
class Game:
|
|
def __init__(self):
|
|
self.personnage = Personnage(" ", ClassType.GUERRIER)
|
|
self.ennemy = Personnage("Zombie", ClassType.ZOMBIE)
|
|
|
|
def attack(self, attacker, victim):
|
|
atk_dmg = attacker.jet_attaque()
|
|
def_dmg = victim.jet_defense()
|
|
victim.change_hp(atk_dmg)
|
|
attacker.change_hp(def_dmg)
|
|
if self.personnage.get_hp() == 0:
|
|
for i in range(50):
|
|
print("FIN")
|
|
if self.ennemy.get_hp() == 0:
|
|
self.ennemy = Personnage("Zombie", ClassType.ZOMBIE)
|