import { Direction } from '../core/ReelAxis.js'; /** A cell coordinate on the reel set. `reel` is column, `cell` is visible cell. */ export interface Cell { reel: number; cell: number; } export interface DropOffset { /** Visible cell in the new grid (start-to-end, 0-indexed). */ cell: number; /** * Where this symbol "came from" expressed as a virtual cell index. * Off-grid values name the cell the symbol enters from: under * `gravity: 'forward'` new symbols come from negative indices (before * cell 0); under `'reverse'` they come from `visibleCells` and up. An * index inside `[0, visibleCells)` is a survivor's OLD cell. * * Read {@link DropOffset.isNew} rather than testing the sign - the sign * only discriminates under forward gravity. */ originalCell: number; /** * Signed cell distance this symbol travels: `cell - originalCell`. * Positive moves toward the end edge (forward gravity), negative toward * the start edge (reverse gravity). Zero means the symbol stays put and * must NOT be animated. */ offsetCells: number; /** * True when this is a fresh symbol entering from off-grid, false for a * survivor that was already on the reel. The discriminator every caller * should branch on; `originalCell < 0` is only equivalent under forward * gravity. */ isNew: boolean; } /** * Compute per-cell drop offsets for one reel given its winner set. * * Returns one entry per visible cell, top-to-bottom. Cells with * `offsetCells === 0` should NOT be animated. they're survivors that * didn't move. * * **Convention** (Moment B): the new grid must place new symbols at the * top `winnerCells.length` cells and survivors at the bottom cells in their * original top-to-bottom order. This matches how server-side gravity * simulations emit cascade results. * * @param options.initial - When `true` (Moment A. the player's first * spin click), every cell is treated as new regardless of `winnerCells` * (which is normally empty for initial spins). When `false` (Moment B * . cascade refill), an empty `winnerCells` means *no movement on this * reel*; survivor reels in a refill correctly return all-zero offsets. * Default `false` so callers can't accidentally trigger a full re-drop * on a reel that had no winners. */ export declare function computeDropOffsets(visibleCells: number, winnerCells: readonly number[], options?: { initial?: boolean; gravity?: Direction; }): DropOffset[]; //# sourceMappingURL=tumbleAlgorithm.d.ts.map