diff --git a/tools/grid.py b/tools/grid.py index 6c5b53a..50190da 100644 --- a/tools/grid.py +++ b/tools/grid.py @@ -377,8 +377,8 @@ class Grid: ) @classmethod - def from_str(cls, grid_string: str, true_char: str = '#') -> 'Grid': - ret = cls() + def from_str(cls, grid_string: str, true_char: str = '#', default: Any = False) -> 'Grid': + ret = cls(default=default) for y, line in enumerate(grid_string.split("/")): for x, c in enumerate(line): ret.set(Coordinate(x, y), c == true_char)