from amazeing import *
import random
-maze = Maze(10, 10)
+maze = Maze(10, 30)
maze.outline()
empty = list(maze.walls_empty())
random.shuffle(empty)
if maze.wall_maintains_topology(wall):
maze.fill_wall(wall)
-backend = TTYBackend(10, 10)
+backend = TTYBackend(10, 30)
backend.set_style("#")
for wall in maze.walls_full():
for pixel in wall.pixel_coords():
self.height: int = maze_height * 2 + 1
self.style: str = style
self.lines: list[list[str]] = [
- [style for _ in range(0, self.width)] for _ in range(0, self.height)
+ [style for _ in range(0, self.height)] for _ in range(0, self.width)
]
def draw_pixel(self, pos: PixelCoord) -> None:
def all_walls(self) -> Generator[WallID]:
for orientation, a_count, b_count in [
- (Orientation.HORIZONTAL, self.width + 1, self.height),
- (Orientation.VERTICAL, self.height + 1, self.width),
+ (Orientation.HORIZONTAL, self.height + 1, self.width),
+ (Orientation.VERTICAL, self.width + 1, self.height),
]:
for a in range(0, a_count):
for b in range(0, b_count):
]:
for a in a_iter:
for b in b_iter:
+ print(f"{a}, {b}, {orientation}")
self.fill_wall(WallID(orientation, a, b))
def walls_full(self) -> Iterable[WallID]: