20 lines
918 B
1"""Terminal renderer for mazes.
2
3Exposes :func:`render_maze` and :func:`run_interactive`.
4:func:`render_maze` converts a finished :class:`MazeGenerator` into a
5truecolor block string. Each wall and cell is a 2-char ASCII pixel painted
6via a 24-bit background color (no Unicode block glyphs are used).
7Supports path animation via ``path_steps``, BFS-solve animation via
8``visited_cells``, DFS walk-back highlighting via ``backtrack``, a dark
9"42" glyph tinted to the current wall palette, and colored entry/exit
10markers. ``pure_ascii=True`` switches to plain ASCII glyphs with no ANSI
11color codes.
12:func:`run_interactive` runs the single-keypress display loop
13(r/g/s/p/c/t/b/y/e/q plus space/,/./[/] for animation control) with cbreak
14terminal mode and ``select``-based interruptible animation.
15"""
16
17from .pixels import render_maze
18from .interactive import run_interactive
19
20__all__ = ["render_maze", "run_interactive"]