Commit 9f2e807c by BellCodeEditor

auto save

parent 2f83ddd5
Showing with 33 additions and 2 deletions
...@@ -21,4 +21,22 @@ class Hero(object): ...@@ -21,4 +21,22 @@ class Hero(object):
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
\ No newline at end of file
class player(Hero):
class player(Hero):
def_init_(self,name):
self.leve1 = 1
self.name = name
self.hp = 200
self.attack = 50
player = player("后羿")
print("玩家的血量值为:",player.hp)
print("玩家的攻击力值为:",plaver.attack)
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