while choice is not "die":
choice = input("Type the number you want to do, \n 1.Check Stats \n 2.Go to shop \n 3.Go to Battle \n 4.Quit Game \n")
##print player stats
if choice == "1":
print(player)
##Shop menue
if choice == "2":
shopChoice = ""
while shopChoice is not "quit":
print("What Type do you want to buy? \n 1.Weapons \n 2.Armor \n 3.Back \n")
shopChoice = input()
##Weapons
if shopChoice == "1":
weaponChoice = ""
while weaponChoice is not "exit_weapon":
shop.printWeapons()
print("9.Back")
weaponChoice = input("What weapon would you like to purchase? : ")
if weaponChoice == "9":
weaponChoice = "exit_weapon"
if (weaponChoice.isdigit() == True):
if shop.weaponLength(weaponChoice) == False:
print("Not a weapon")
else:
purchase = shop.getWeapon(weaponChoice)
cost = shop.getWeaponCost(weaponChoice)
if player.hasMoney(cost) == True:
player.buyWeapon(purchase)
print("\n Item Purchased \n")
weaponChoice = "exit_weapon"
else:
print("Does not have enough money \n")
else:
print("\n")
##Armors
if shopChoice == "2":
armorChoice = ""
while armorChoice is not "exit_armor":
shop.printArmors()
print("9.Back")
armorChoice = input("What weapon would you like to purchase? : ")
if armorChoice == "9":
armorChoice = "exit_armor"
if (armorChoice.isdigit() == True):
if shop.armorLength(armorChoice) == False:
print("Not a armor")
else:
purchase = shop.getArmor(armorChoice)
cost = shop.getArmorCost(armorChoice)
if player.hasMoney(cost) == True:
player.buyArmor(purchase)
print("\n Item Purchased \n")
armorChoice = "exit_armor"
else:
print("Does not have enough money \n")
else:
print("\n")
##Shop Quit
if shopChoice == "3":
shopChoice = "quit"
##Battle
if choice =="3":
enemyAttack = random.randint(0,50)
enemyDefence = random.randint(0,50)
enemy = Enemy(Weapon("spord",enemyAttack,33),Armor("cloth",enemyDefence,233))
aliveState = True
while aliveState != False:
playerHit = player.attack() - enemy.defence()
if playerHit > 0:
enemy.loseHealth(playerHit)
print("Enemy Suffered " + str(playerHit) + " Damage")
playerMiss = False
if playerHit <= 0:
print("You missed")
playerMiss = True
enemyHit = enemy.attack() - player.defence()
if enemyHit > 0:
player.loseHealth(enemyHit)
print("You Suffered " + str(enemyHit) + " Damage")
if enemyHit <= 0:
print("Enemy missed")
if playerMiss == True:
print("StaleMate \n Match End")
aliveState = False
if enemy.isAlive() == False:
print("You win")
player.gainMoney(50)
print("You gain 50 gold \n")
aliveState = False
if player.isAlive() == False:
print("You Lost \n")
aliveState = False
player.healing()
if choice == "4":
choice = "die"
print("Thank you for playing")