User player entity instead of temporary Player class

This commit is contained in:
Yohann D'ANELLO
2020-11-06 17:48:47 +01:00
parent 81479f99e2
commit 8641e7d13d
3 changed files with 19 additions and 24 deletions

View File

@ -4,3 +4,15 @@ from ..interfaces import FightingEntity
class Player(FightingEntity):
maxhealth = 20
strength = 5
def move_up(self) -> None:
self.y -= 1
def move_down(self) -> None:
self.y += 1
def move_left(self) -> None:
self.x -= 1
def move_right(self) -> None:
self.x += 1