19 lines
471 B
Python
Raw Normal View History

from ..interfaces import FightingEntity
2020-11-06 15:33:26 +01:00
class Player(FightingEntity):
maxhealth = 20
strength = 5
2020-11-06 18:03:30 +01:00
def move_up(self) -> bool:
return self.check_move(self.y - 1, self.x, True)
2020-11-06 18:03:30 +01:00
def move_down(self) -> bool:
return self.check_move(self.y + 1, self.x, True)
2020-11-06 18:03:30 +01:00
def move_left(self) -> bool:
return self.check_move(self.y, self.x - 1, True)
2020-11-06 18:03:30 +01:00
def move_right(self) -> bool:
return self.check_move(self.y, self.x + 1, True)