Commit 0e2f7efa by BellCodeEditor

save project

parent 87b13791
Showing with 2 additions and 6 deletions
...@@ -7,12 +7,8 @@ class Hero: ...@@ -7,12 +7,8 @@ class Hero:
self.level+=1 self.level+=1
self.hp+=20 self.hp+=20
self.attack+=12 self.attack+=12
a=Hero() a=Hero(100,10)
b=Hero() b=Hero(200,5)
a.hp=100
a.attack=10
b.hp=200
b.attack=5
print(a.attack) print(a.attack)
print(a.hp) print(a.hp)
print(a.level) print(a.level)
......
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