Commit 1c6992aa by BellCodeEditor

save project

parent 4a5bc170
Showing with 8 additions and 4 deletions
class Hero():
def __init__(self):
self.hp=100
def __init__(self,name,hp,attack):
self.name = name
self.hp=hp
self.level=1
self.attack=240
self.attack=attack
yase = Hero("")
yase = Hero("亚瑟",300,200)
houyi = Hero("后裔",240,240)
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