Commit cc3a8903 by BellCodeEditor

save project

parent 0c0a639c
Showing with 10 additions and 7 deletions
class Hero:
def __init__(self):
self.level = 15
self.hp = 9999999999999999999999
self.attack = 9999999999999999999999
def __init__(self,name,hp,attack,level):
self.level = level
self.hp = hp
self.attack = attack
self.name = name
yase = Hero()
print(yase.attack)
\ No newline at end of file
yase = Hero("yase",9999,999,15)
houyi = Hero("houyi",8888,888,15)
print("亚瑟的血有",yase.hp)
print("后羿的血有",houyi.hp)
\ 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