Commit 06e71d9a by BellCodeEditor

save project

parent 29037bd3
Showing with 3 additions and 2 deletions
...@@ -23,10 +23,11 @@ class Hero(object): ...@@ -23,10 +23,11 @@ class Hero(object):
class Player(Hero): class Player(Hero):
def__init__(self,name): def__init__(self,name,type):
super().__init__(name) super().__init__(name)
self.hp = 300 self.hp = 300
self.attack = 20 self.attack = 20
self.hero_type = hero_type
print()
player = Player("后羿") player = Player("后羿")
print(player.hp) print(player.hp)
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