Commit 6215f1a6 by BellCodeEditor

save project

parent 9b304033
Showing with 7 additions and 0 deletions
...@@ -10,3 +10,9 @@ ghost=Hero('ghost',400,40) ...@@ -10,3 +10,9 @@ ghost=Hero('ghost',400,40)
print(bc.attack) print(bc.attack)
print(ad.attack) print(ad.attack)
print(ghost.attack) print(ghost.attack)
def upgrade()
bc.level+=1
bc.hp+=30
bc.attack+=5
upgrade()
print(bc.name,bc.level,bc.hp,bc.attack)
\ 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