예제 #1
0
파일: act3.py 프로젝트: mccp/aup-oop2011a
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)

예제 #2
0
파일: act3.py 프로젝트: jmaala/aup-oop2011a
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!"
예제 #3
0
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!"