From 7934ed0d9d6f100ed357561b35f3aea77cea2a63 Mon Sep 17 00:00:00 2001 From: Yakudami Date: Tue, 28 Apr 2020 00:45:00 +0200 Subject: [PATCH] it's alive! 2 --- agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent.py b/agent.py index a70016b..b00b18a 100644 --- a/agent.py +++ b/agent.py @@ -93,10 +93,10 @@ class Agent: self.y = next.y def check_if_can_move(self, next_coords: Coordinates): - tile_on_map = 0 <= next_coords.x < self.assigned_warehouse.width and 0 <= next_coords.y < self.assigned_warehouse.height + tile_on_map = 0 <= next_coords.x < self.warehouse.width and 0 <= next_coords.y < self.warehouse.height if not tile_on_map: return False - next_tile = self.assigned_warehouse.tiles[next_coords.x][next_coords.y] + next_tile = self.warehouse.tiles[next_coords.x][next_coords.y] tile_passable = isinstance(next_tile, Tile) and next_tile.category.passable return tile_passable