Commit 75a3f9df by BellCodeEditor

save project

parent 67a8a584
Showing with 26 additions and 2 deletions
...@@ -10,8 +10,32 @@ class Cat: ...@@ -10,8 +10,32 @@ class Cat:
print("小猫飞快的跑起来") print("小猫飞快的跑起来")
def skill(self,jk): def skill(self,jk):
print("mao抓住了"+jk)
role = Cat() role = Cat()
role.skill("老鼠") role.skill("老鼠")
\ No newline at end of file # class Hero(object):
# def __init__(self, name):
# self.level = 1
# self.hp = 250
# self.attack = 40
# self.name = name
# def combat(self,vvv):
# vvv.hp-=self.attack
# sas=self.name+"对"+vvv.name+"发起攻击,"
# ses="造成"+str(self.attack)+"的伤害,"
# if vvv.hp > 0:
# sos=vvv.name+"还剩下"+str(vvv.hp)+"血量。。。"
# print(sas+ses+sos)
# else:
# sos=vvv.name+"阵亡"
# print(sas+ses+sos)
# exit()
# yase = Hero("垭瑟")
# houyi= Hero("后羿")
# 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