Routing demo

python -m bruhanimate.demos.routing_demo

An original, public maze fixture is solved with breadth-first search. A repeating AnimationSequence pulses the source, traces the route, moves a short trail along it, and draws an arrival ripple. Snow keeps running behind the board. Resize recenters the board and highlights without restarting their clocks; q exits.

find_route is application code, not part of the library’s path animation API. build_scene(buffer) can also be passed to capture or export_animation for a headless preview. See Paths, pulses, and ripples for typed helper options and SVG, PNG, GIF, and MP4 export for saving a playable clip.

An original public routing fixture with path, pulse and ripple overlays.

Run python -m bruhanimate.demos.routing_demo. Resize freely; q quits. No puzzle input files or external resources are needed.

bruhanimate.demos.routing_demo.find_route(board: Sequence[str] = ('#################', '#S....#.........#', '#.###.#.#####.#.#', '#...#...#.....#.#', '###.#####.#####.#', '#.............E.#', '#################')) → tuple[tuple[int, int], ...][source]

Breadth-first route on this demo’s small public fixture; no library solver.

bruhanimate.demos.routing_demo.build_scene(buffer: Buffer) → Scene[source]

Keep the board/snow alive while a public sequence replaces the accents.

bruhanimate.demos.routing_demo.run(*, frames: int | None = None, fps: float = 60, on_resize: Literal['raise', 'resize'] = 'resize') → int[source]

Play the repeating fixture with simulation timing independent of FPS.