Spikes, better gameHandler, map width and height computed automatically & big peanut hard map

This commit is contained in:
2026-10-10 16:21:11 +02:00
parent 14a39b7154
commit 17f00ebca2
12 changed files with 131 additions and 37 deletions
+6
View File
@@ -10,6 +10,12 @@ class MapSet:
self.mapReader = mapReader
self.maps = [self.mapReader.read_map(name) for name in mapNames]
def get_map_by_name(self, name: str):
for map in self.maps:
if map.name == name:
return map
raise ValueError(f"Map with name '{name}' not found in the MapSet.")
def get_map(self, index: int):
if index < 0 or index >= len(self.maps):
raise IndexError("Map index out of range.")