fix conflicts

This commit is contained in:
andrea
2025-08-01 22:27:10 +02:00
6 changed files with 87 additions and 8 deletions

View File

@@ -174,6 +174,28 @@ class BrSimPlayer(_resource.BrSimResource):
return False
self.inventory.append(item)
def move(self, delta_x, delta_y):
# XXX maps limits:
# probably this isn't player's business
# game orchestror should manage it
# to avoid that the player can go out from the map
# or can reach unaccessible points
# also because the player doens't know the Map (entities/gamemap.py)
self.coord_x += delta_x
self.coord_y += delta_y
def move_right(self):
self._move(1, 0)
def move_left(self):
self._move(-1, 0)
def move_top(self):
self._move(0, -1)
def move_bottom(self):
self._move(0, 1)
def escape(self):
# TODO It can run away from the fighting
return