Commit a8e7378f by BellCodeEditor

save project

parent b6a433de
Showing with 7 additions and 7 deletions
......@@ -17,14 +17,14 @@ class Hero():
yase = Hero("垭瑟")
houyi= Hero("后羿")
class.player(Hero):
class Player(Hero):
def __init__(self, name):
super().__init__(level,name)
super().__init__(self.name)
self.hp = 100
self.attack = 400
player = Player("后羿")
computer = Hero("亚瑟")
print("玩家的血量为:",player.hp)
print("玩家的等级为:",player.level)
print("玩家的攻击力为:",player.attack)
print("玩家的名称为:",player.name)
\ No newline at end of file
print("玩家的血量为:",Player.hp)
print("玩家的等级为:",Player.level)
print("玩家的攻击力为:",Player.attack)
print("玩家的名称为:",Player.name)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment