Added ap min_moves, gameStop callback and optimizations

This commit is contained in:
2026-10-10 15:29:20 +02:00
parent 10a3d93821
commit 14a39b7154
4 changed files with 42 additions and 28 deletions
+4
View File
@@ -16,6 +16,7 @@ class Map:
self.width = int(map_data.get('width', 0))
self.height = int(map_data.get('height', 0))
self.difficulty = float(map_data.get('difficulty', 0.0))
self.min_moves = map_data.get('min_moves', None)
self.layout = map_data.get('layout', [])
def get_block_at(self, x, y) -> Block | None:
@@ -38,6 +39,9 @@ class Map:
return block.type
return None
def get_min_moves(self):
return self.min_moves
def to_string_dict(self):
"""
Returns a string matrix representation of the map layout.