Commit 35b2a0ab by BellCodeEditor

save project

parent 9e797f8b
Showing with 8 additions and 7 deletions
...@@ -4,15 +4,15 @@ class ying: ...@@ -4,15 +4,15 @@ class ying:
self.hp=hp self.hp=hp
self.ex=1 self.ex=1
self.kill=kill self.kill=kill
def upgrade(self):
self.ex=self.ex + 1
self.hp=self.hp + 500
self.kill=self.kill + 50
ys=ying("yase",3000,260) ys=ying("yase",3000,260)
hy=ying("houyi",2300,330) hy=ying("houyi",2300,330)
print(ys.hp) # print(ys.hp)
print(hy.kill) # print(hy.kill)
def upgrade(): ys.upgrade()
ys.ex=ys.ex + 1
ys.hp=ys.hp + 500
ys.kill=ys.kill + 50
upgrade()
print(ys.hp) print(ys.hp)
print(ys.kill) print(ys.kill)
\ 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