Commit 5febab37 by BellCodeEditor

save project

parent a0c0f5d5
Showing with 3 additions and 2 deletions
......@@ -5,9 +5,9 @@ class hero:
self.attack = attack
yase = hero(300,20)
houyi = hero(210,30)
def a(self):
def upgrade(self):
self.level = self.level + 1
self.hp = self.hp + 50
self.attack = self.attack +5
yase.a()
yase.upgrade()
print(yase.hp)
\ 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