function:get_tile - check if in map
This commit is contained in:
@@ -42,4 +42,9 @@ class Map:
|
|||||||
(43, 3, "Room 105")
|
(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"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user