Commit b890ac93 by BellCodeEditor

save project

parent ece3d6ee
Showing with 7 additions and 3 deletions
......@@ -4,5 +4,9 @@ class Hero():
self.hp=hp
self.attack=attack
self.name=name
yase=Hero(name,hp,attack)
print(yase.name,hp,attack)
\ No newline at end of file
yase=Hero('亚瑟',300,20)
print(yase.name)
def upgrade():
yase.level=yase.level+1
yase.hp= yase.hp+50
yase.attack=yase.attack+1
\ 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