Commit 51ec2888 by BellCodeEditor

save project

parent 5d80850b
Showing with 7 additions and 6 deletions
class Hero():
def __init__(self,name,hp,attack):
def __init__(self,name,hp,attack,baoji):
self.level = 1
self.hp = 300
self.attack = 20
self.baoji = 10
self.hp = hp
self.attack = attack
self.baoji = baoji
ya_suo = Hero("疾风剑豪",300,20)
a_li = Hero("半神之弓",250,23)
ya_suo = Hero("疾风剑豪",300,20,10)
a_li = Hero("半神之弓",250,23,0)
print(ya_suo.hp)
print(a_li.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