You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
235 B
12 lines
235 B
6 months ago
|
class Person:
|
||
|
def __init__(self, name, hp, damage):
|
||
|
self.name = name
|
||
|
self.hp = hp
|
||
|
self.damage = damage
|
||
|
|
||
|
def hit(self, who):
|
||
|
who.hp -= self.damage
|
||
|
|
||
|
def alive(self):
|
||
|
return self.hp > 0
|