Reference · Rules, solvers and generation
renumberedRecordfunction
A RECORD KEPT BY LEVEL NUMBER, MOVED TO THE NUMBERS THE LEVELS HAVE NOW.
Tsunagi's levels were renumbered on 2026-09-26 (renumbered.data.ts): the
same boards, more of them, easiest first. Anything that says "level 10" and
was written before then means the board that was level 10, so it is moved
to where that board is now — never left on the number, where it would be
somebody's time on a different board. A number the old order never had is
dropped: it names no board.
The server's rows are moved by a migration; this is for what a browser kept
of its own (tsunagiKept.ts).
Import it
import { renumberedRecord } from "@johnmorrisdotca/tsunagi";
Definition
function renumberedRecord(size: number, old: Readonly<Record<number, number>>, moves?: Readonly<Record<number, readonly number[]>>): Record<number, number>
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
old | Readonly<Record<number, number>> | The old level-number record to migrate. |
moves (optional) | Readonly<Record<number, readonly number[]>> | The old-to-new level-number mapping. |
Returns
Record<number, number>
A RECORD KEPT BY LEVEL NUMBER, MOVED TO THE NUMBERS THE LEVELS HAVE NOW. Tsunagi's levels were renumbered on 2026-09-26 (renumbered.data.ts): the same boards, more of them, easiest first. Anything that says "level 10" and was written before then means the board that was level 10, so it is moved to where that board is now — never left on the number, where it would be somebody's time on a different board. A number the old order never had is dropped: it names no board.
Examples
import { renumberedRecord } from "@johnmorrisdotca/tsunagi";
console.log(renumberedRecord(4,{1:100},{4:[2,1]}));{ '2': 100 }What it prints (run when this page was built)