Better scoring and map selection + Map delta
This commit is contained in:
+8
-2
@@ -71,6 +71,12 @@ class Map:
|
||||
def to_type_dict(self):
|
||||
"""Returns a matrix containing block types and None for empty spaces."""
|
||||
return [
|
||||
[block.type if block is not None else None for block in row]
|
||||
[self._visible_block_type(block) for block in row]
|
||||
for row in self.layout
|
||||
]
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
def _visible_block_type(block):
|
||||
if block is None or getattr(block, "collected", False):
|
||||
return None
|
||||
return block.type
|
||||
Reference in New Issue
Block a user