Commit cd7fb6df by BellCodeEditor

save project

parent f85204ba
Showing with 16 additions and 6 deletions
class Hero:
def __init__(self):
self.lever=1000000
self.hp=2934536458794876354
self.attack=12345678909876543
yase=Hero()
print(yase.hp)
def __init__(self,name,hp,attack):
self.name=name
self.lever=1
self.hp=hp
self.attack=attack
def upgroud(self):
self.lever=self.lever+1
self.hp=self.hp+100
self.attack=self.attack+200
yase=Hero("亚瑟",300,10)
houyi=Hero("后羿",240,30)
yase.upgroud()
houyi.upgroud()
houyi.upgroud()
print(yase.lever)
\ 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