Commit 18d9de61 by BellCodeEditor

save project

parent 699279f2
Showing with 6 additions and 3 deletions
......@@ -2,11 +2,14 @@ class Hero:
def __init__(self,name,hy,attack):
self.level=1
self.name=name
self.hp=hp
self.hy=hy
self.attack=attack
yase=Hero('蚁王',300,20)
yase=Hero('工蚁',250,20)
yase=Hero('兵蚁',200,20)
print(yase.attack)
print(hy.attack)
print(k.attack)
\ No newline at end of file
print(k.attack)
self.level=self.level+1
self.hy=self.hy+50
self.attack=self.attack+4
\ 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