Loading recipe…
Press Run. A four-by-three board opens with one seed coin and runs the respin
loop; on the right, every board.events beat prints as it fires — colour-coded
and in order. Press again to clear and run a fresh feature.
This is the companion to the Hold & Win guide: the same
state machine the guide diagrams, playing out live. Watch a wave fire
respin:start, then a row of cell:landed in stagger order (a few of them
coin:locked), then respins:changed — hit-reset when a coin landed, miss
when none did — then respin:end, and finally board:full / feature:end when
the board fills or the counter runs out.
The whole recipe is event listeners
The board is an ordinary HoldAndWinBuilder board. The trace adds no mechanic —
it just subscribes:
board.events.on('respin:start', ({ round, spinning }) => log(`round ${round} · ${spinning.length} spinning`));
board.events.on('cell:landed', ({ cell, coin }) => log(`${cell.col},${cell.row} ${coin ? 'COIN' : '—'}`));
board.events.on('coin:locked', ({ locked, capacity })=> log(`${locked}/${capacity}`));
board.events.on('respins:changed',({ value, reason }) => log(`${value} (${reason})`));
board.events.on('feature:end', ({ rounds, full }) => log(`${rounds} rounds · ${full ? 'full' : 'no respins'}`));
Every line you see is a real payload off the real event. That is the entire integration surface — react to these and the board drives the rest.
The driver is just a loop
board.enter([{ cell: { col: 0, row: 0 }, id: 'coin', data: { value: 5 } }]);
while (true) {
const result = await board.respin(pickHits()); // pickHits = your result source
if (result.done) break;
}
pickHits() here is a mock that gives each free cell a small chance of landing a
coin; in a real game it’s your server response. respin() resolves after the
wave lands and the counter resolves, so the loop reads straight down.
Related
- Hold & Win guide — the lifecycle, events and wiring in full
- Hold & Win respin — the minimal starter board
- Single skip button —
board.skip()and thefeature:skipevent