diff --git a/game/screens/game_screens.py b/game/screens/game_screens.py index 238dc6f..5144aea 100644 --- a/game/screens/game_screens.py +++ b/game/screens/game_screens.py @@ -40,7 +40,7 @@ class MainScreen(Screen): case tcod.event.KeyDown(sym=sym) if sym in DIRECTION_KEYS: new_pos = player.components[Position] + DIRECTION_KEYS[sym] map_pos = world_pos_to_map_pos(new_pos) - if not map.walkable[map_pos.y][map_pos.x]: + if not map.walkable[map_pos.y, map_pos.x]: return None player.components[Position] = new_pos cam_map = world_pos_to_map_pos(new_pos) @@ -76,7 +76,7 @@ class MainScreen(Screen): map_pos = world_pos_to_map_pos(e_pos) if (-w <= screen_pos.x < w\ and -h <= screen_pos.y < h): - if map.fov[map_pos.y][map_pos.x]: + if map.fov[map_pos.y, map_pos.x]: graphic = e_graph else: graphic = Graphic(0x2591, (50, 50, 50))