Commit 91a0d372 by BellCodeEditor

save project

parent 29388e91
Showing with 3 additions and 1 deletions
import random
class Hero: # 英雄类 class Hero: # 英雄类
def __init__(self, name): # 实例属性 def __init__(self, name): # 实例属性
self.name = name self.name = name
self.level = 1 self.level = 1
...@@ -20,8 +22,8 @@ class Hero: # 英雄类 ...@@ -20,8 +22,8 @@ class Hero: # 英雄类
info = info1+info2+info3 info = info1+info2+info3
print(info) print(info)
exit() exit()
def combat(self)
class Player(Hero): # 玩家英雄 class Player(Hero): # 玩家英雄
def __init__(self,name,i): def __init__(self,name,i):
super().__init__(name) super().__init__(name)
......
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