function:get_tile - check if in map

This commit is contained in:
Lukas Kammerhofer
2026-05-07 19:50:18 +02:00
parent 833c735d38
commit 7c6d8594d7
+5
View File
@@ -42,4 +42,9 @@ class Map:
(43, 3, "Room 105")
]
def get_tile(self, column: int, row: int):
if 0 <= row < len(self.map) and 0 <= column < len(self.map[row]):
return self.map[row][column]
return "W"