Commit 2174d480 by BellCodeEditor

save project

parent 1458e94c
Showing with 10 additions and 2 deletions
...@@ -12,4 +12,12 @@ class Hero(object): ...@@ -12,4 +12,12 @@ class Hero(object):
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
houyi.combat(yase) houyi.combat(yase)
\ No newline at end of file class Player(Hero):
def __init__(self,name):
self.level=1
self.name=name
self.hp=200
self.attack=50
player1=Player("后羿")
\ 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