Commit 4c3aea57 by BellCodeEditor

save project

parent f5913059
Showing with 6 additions and 14 deletions
# 英雄角色类
class Hero(object):
def __init__(self, level,hp,attack,name):
self.level = level
self.hp = hp
self.attack = attack
self.name = name
def upgrade():
self.level = self.level +1
self.hp = self.hp +50
self.attack = self.attack +4
yase = Hero(1,300,20,'yase')
hoyi = Hero(1,250,23,'hoyi')
def sum(meney):
count=0
for i in money:
count=count+1
return count
\ 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