Spikes, better gameHandler, map width and height computed automatically & big peanut hard map
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user