From: Axy Date: Thu, 5 Feb 2026 02:29:21 +0000 (+0100) Subject: Rename method and fix X-Git-Url: https://git.uwuaxy.net/?a=commitdiff_plain;ds=inline;p=axy%2Fft%2Fa-maze-ing.git Rename method and fix --- diff --git a/__main__.py b/__main__.py index 6706030..8e366f8 100644 --- a/__main__.py +++ b/__main__.py @@ -6,7 +6,7 @@ maze.outline() empty = list(maze.walls_empty()) random.shuffle(empty) for wall in empty: - if maze.wall_maintains_topology(wall): + if not maze.wall_bisects(wall): maze.fill_wall(wall) backend = TTYBackend(50, 20) diff --git a/amazeing/maze.py b/amazeing/maze.py index 9175ffb..ccfd439 100644 --- a/amazeing/maze.py +++ b/amazeing/maze.py @@ -170,7 +170,7 @@ class Maze: def walls_empty(self) -> Iterable[WallID]: return filter(lambda w: not self._get_wall(w).is_full(), self.all_walls()) - def wall_maintains_topology(self, wall: WallID) -> bool: + def wall_bisects(self, wall: WallID) -> bool: a = { cast(NetworkID, neighbour.network_id) for neighbour in self.get_walls_checked(wall.a_neighbours()) @@ -181,4 +181,4 @@ class Maze: for neighbour in self.get_walls_checked(wall.b_neighbours()) if neighbour.is_full() } - return len(a & b) == 0 + return len(a & b) != 0