Commit 8cbd18a7 by BellCodeEditor

auto save

parent 449bec51
Showing with 16 additions and 0 deletions
...@@ -20,3 +20,19 @@ class Hero(object): ...@@ -20,3 +20,19 @@ class Hero(object):
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
class player(Hero):
def__init__(self,name):
super().__init__(name)
self.hp=200
self.attack=50
player=player("后羿")
player("玩家血量"player.hp)
player("玩家血量"player.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