Commit a0c0f5d5 by BellCodeEditor

save project

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