from People.Person import * from People.Ninja import * from People.Warrior import * import time naruto = Warrior("Naruto", 200) sasuke = Ninja("Sasuke", 100) while sasuke.is_alive() and naruto.is_alive(): sasuke.attack(naruto) if naruto.is_alive(): naruto.attack(sasuke) print("Player: " + sasuke.name + " Health: " + str(sasuke.health) + "\n") print("Player: " + naruto.name + " Health: " + str(naruto.health) + "\n") time.sleep(1) if naruto.is_alive() and (not sasuke.is_alive()) : print("Naruto wins!\n") print(naruto.health) else: print("Sasuke wins!\n") print(sasuke.health)
from People.Person import * from People.Warrior import * from People.Ninja import * naruto = Warrior("naruto") sasuke = Ninja("sasuke") while naruto.is_alive() and sasuke.is_alive(): sasuke.attack(naruto) if naruto.is_alive(): naruto.attack(sasuke) if naruto.is_alive() and not sasuke.is_alive(): print naruto.name + " wins!" else: print sasuke.name + " wins!"
from People.Person import * from People.Warrior import * from People.Ninja import * naruto = Warrior("Erwin") sasuke = Ninja("Sasuke") while(naruto.is_alive() and sasuke.is_alive()): sasuke.attack(naruto) if(naruto.is_alive()): naruto.attack(sasuke) if(naruto.is_alive() and not sasuke.is_alive()): print naruto.name + " wins!" else: print sasuke.name + " wins!"