Commit 9f2e807c by BellCodeEditor

auto save

parent 2f83ddd5
Showing with 32 additions and 0 deletions
......@@ -22,3 +22,21 @@ class Hero(object):
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
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