Commit c553d293 by BellCodeEditor

save project

parent 0e00be10
Showing with 9 additions and 4 deletions
......@@ -17,6 +17,11 @@ class Hero:
info = info1+info2+info3
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 = 200
self.attack = 50
Player = Player('后羿')
print('玩家的血量力为:'player.hp)
print('玩家的攻击力为:'player.attack)
\ 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