All entities can move, not only players
This commit is contained in:
@ -21,18 +21,6 @@ class Player(FightingEntity):
|
||||
self.map.currenty = y
|
||||
self.map.currentx = x
|
||||
|
||||
def move_up(self) -> bool:
|
||||
return self.check_move(self.y - 1, self.x, True)
|
||||
|
||||
def move_down(self) -> bool:
|
||||
return self.check_move(self.y + 1, self.x, True)
|
||||
|
||||
def move_left(self) -> bool:
|
||||
return self.check_move(self.y, self.x - 1, True)
|
||||
|
||||
def move_right(self) -> bool:
|
||||
return self.check_move(self.y, self.x + 1, True)
|
||||
|
||||
def level_up(self) -> None:
|
||||
while self.current_xp > self.max_xp:
|
||||
self.level += 1
|
||||
|
Reference in New Issue
Block a user