From 6136307bd0c46c91875ad9d683655c49ef1e31dd Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 8 Apr 2023 16:23:28 +0800 Subject: [PATCH] save project --- diy2.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/diy2.py b/diy2.py index 3246c11..9f55905 100644 --- a/diy2.py +++ b/diy2.py @@ -23,16 +23,13 @@ class Hero: # 英雄类 self.max_hp = self.hp class Player(Hero): # 玩家英雄 - def __init__(self,name,tap): + def __init__(self,name): super().__init__(name) self.hp=200 self.attack=50 - self.tap=tap - print("角色"+self.name+",英雄类型为:"+self.tap) - print("当前等级、血量、攻击力分别为"+str(self.level)+str(self.hp)+str(self.attack)) - + player = Player("后羿") print("玩家的血量值为:",player.hp) -- libgit2 0.25.0