Commit f27c58a8 by BellCodeEditor

save project

parent 11984187
Showing with 10 additions and 3 deletions
......@@ -20,5 +20,13 @@ class Hero(object):
print(info)
exit()
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
\ No newline at end of file
class Player(Hero)):
def__init__(self,name):
super().__init__(name)
self.hp = 300
self.attack = 20
player = Player("后羿")
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