Added ap min_moves, gameStop callback and optimizations
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user