Commit 472c5a2c by BellCodeEditor

save project

parent 9bebf302
Showing with 5 additions and 5 deletions
......@@ -3,10 +3,10 @@ class hero():
self.level=a
self.hp=b
self.attack=c
def upgrade():
yase.level+=1
yase.hp+=40
yase.attack+=30
def upgrade(self):
self.level+=1
self.hp+=40
self.attack+=30
yase=hero(1,500,40)
upgrade()
yase.upgrade()
print(yase.hp)
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