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:
def __init__(self,name,level,hp,attack):
self.level=level
self.hp=hp
self.attack=attack
self.name=name
def up(self):
self.level+=1
self.hp+=3
self.attack+=0.5
def up(self,a,b,c):
self.level+=a
self.hp+=b
self.attack+=c
steve=Mc('steve',1,20,2)
alex=Mc('alex',1,18,2)
alex=Mc('alex',1,18,3)
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