Commit 5a9176f1 by BellCodeEditor

save project

parent ad934b14
Showing with 10 additions and 6 deletions
import turtle
\ No newline at end of file
class Mc: class Mc:
def __init__(self,name,level,hp,attack): def __init__(self,name,level,hp,attack):
self.level=level self.level=level
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
self.name=name self.name=name
def up(self): def up(self,a,b,c):
self.level+=1 self.level+=a
self.hp+=3 self.hp+=b
self.attack+=0.5 self.attack+=c
steve=Mc('steve',1,20,2) steve=Mc('steve',1,20,2)
alex=Mc('alex',1,18,2) alex=Mc('alex',1,18,3)
herobrine=Mc('herobrine',5,40,10) herobrine=Mc('herobrine',5,40,10)
steve.up(1,2,1)
alex.up(1,2,0.5)
herobrine.up(3,4,2)
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