Commit 826c579c by BellCodeEditor

save project

parent 55d226bb
Showing with 6 additions and 10 deletions
...@@ -4,17 +4,13 @@ class Hero: ...@@ -4,17 +4,13 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero('yase',300,20) self=Hero('yase',300,20)
hy=Hero('',250,23) self=Hero('Kai',3000,300)
k=Hero('Kai',3000,300)
print(yase.attack)
print(hy.attack)
print(k.attack)
def sb(): def sb(self):
yase.level=yase.level+1 self.level=self.level+1
yase.hp=hp+100 self.hp=self+100
yase.attack=yase.attack+50 self.attack=self.attack+50
sb() sb()
sb() sb()
......
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