Generate a bounded heads-and-tails sequence with side totals and its longest consecutive run.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Unseeded flips draw 32-bit Web Crypto values and use rejection sampling before mapping the two equally sized outcomes to heads and tails. Seed text instead drives a repeatable Mulberry32 stream, and one scan of the finished sequence counts both sides and updates the longest run whenever a streak grows.
Count: 10 Seed: kickoff
Sequence: H,H,T,H,H,H,H,H,H,H Heads: 9 Tails: 1 Longest run: 7 Longest run side: H
Classroom probability exercises inspect counts and streaks, board games resolve a two-way tie, and deterministic software fixtures replay one exact binary sequence.