Beam splitting demo¶
See Panels, layer clocks, and temporary overlays for the complete composition guide and controls.
Falling beams on an original public fixture, with independently paced layers.
Run python -m bruhanimate.demos.beam_demo. Space pauses the solver, n/right steps, +/- changes solver speed, and q quits. Snow and the introductory overlay keep advancing while the solver is paused. No files or puzzle inputs are needed.
- class bruhanimate.demos.beam_demo.BeamState(active: frozenset[tuple[int, int]], visited: frozenset[tuple[int, int]], splits: int = 0, exits: int = 0, complete: bool = False)[source]¶
- active: frozenset[tuple[int, int]]¶
- visited: frozenset[tuple[int, int]]¶
- splits: int = 0¶
- exits: int = 0¶
- complete: bool = False¶
- __init__(active: frozenset[tuple[int, int]], visited: frozenset[tuple[int, int]], splits: int = 0, exits: int = 0, complete: bool = False) None¶
- bruhanimate.demos.beam_demo.solve(board: Sequence[str] = ('.......S.......', '...............', '.......^.......', '...............', '......^.^......', '...............', '.....^.^.^.....', '...............', '...............')) Iterator[BeamState][source]¶
Yield one immutable snapshot per row, retaining only current board state.
Cells are ‘.’, ‘^’, or a single top-row ‘S’. Splits take effect on the next row; out-of-bounds branches exit and coincident branches merge. This is a small visualization example, not an Advent of Code solution or input.
- bruhanimate.demos.beam_demo.draw_state(state: BeamState, buffer: Buffer) None[source]¶
Draw only current state; puzzle-specific glyphs stay in the demo.