Commit 9a88d68b by BellCodeEditor

save project

parent c62cb4eb
Showing with 11 additions and 4 deletions
class Hero:
def __init__(self, hp, attack):
self.level = 1
self.
\ No newline at end of file
def __init__(self, name, hp, attack):
self.name = name;
self.hp = hp;
self.attack = attack;
player_first = Hero("first", 100, 20);
player_second = Hero("second", 300, 10);
print(player_first.hp);
print(player_second.attack);
\ 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