Commit 6ca07728 by BellCodeEditor

auto save

parent 72908e81
Showing with 9 additions and 3 deletions
......@@ -8,8 +8,14 @@ class Hero(object):
def combat(self,enemy): # 攻击
enemy.hp-=self.attack
if enemy.hp>0
if enemy.hp>0:
print(self.name+"gj"+enemy.name+str(self.attack)+"d")
else:
print(enemy.name+"sbsbsbsbsb")
exit()
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
\ No newline at end of file
for i in range(10):
yase.combat(houyi)
\ 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