Commit 31e38174 by BellCodeEditor

save project

parent 317b87da
Showing with 12 additions and 2 deletions
...@@ -22,9 +22,19 @@ class Hero: # 英雄类 ...@@ -22,9 +22,19 @@ class Hero: # 英雄类
exit() exit()
class Player(): # 玩家英雄 class Player(Hero): # 玩家英雄
def __init__(self,name): def __init__(self,name):
??? class Hero(object):
def __init__(self, name):
self.level = 1
self.hp = 270
self.attack = 40
self.name = name
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
player = Player("后羿") player = Player("后羿")
......
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