Commit 7841d155 by BellCodeEditor

save project

parent b8eb775c
Showing with 6 additions and 2 deletions
......@@ -5,8 +5,12 @@ class Hero:
self.hp =250
self.attack = 50
def combat(self,enemy):
class Plarer(Hero):
def __init__(self,name):
super().__init__(name)
self.hp = 200
self.attack = 50
class Plarer(Hero)
def combat(self,enemy):
enemy.hp-=self.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