Всем привет, почему не генерируется новое число ?
import hero
import monsters
hr = hero.WarriorHero('kyk','warrior')
print(hr.get_healthH())
mr = monsters.ClawMonster('ClawMon')
print(mr.get_healthM())
while hr.get_healthH() >0 and mr.get_healthM() >0:
damage_hero = hr.get_damageH()
damage_monster = mr.get_damageM()
hr.set_healthH(damage_monster)
print("monster damage to hero " ,damage_monster)
mr.set_healthM(damage_hero)
print("hero damage to monster " ,damage_hero)
print(hr.get_healthH(), mr.get_healthM())
if hr.get_healthH() < mr.get_healthM():
print("Монстр победил")
else:
print("Победил Герой")
def damage(self):
self.damage_monster = random.randint(8,10)
def get_damageM(self):
return self.damage_monster