Tsunagi documentation
Tsunagi 繋ぎ — Connect-the-pairs line puzzle
Join each pair with a separate line and fill the board, through fixed levels or seeded puzzles.
Install
npm install @johnmorrisdotca/tsunagi
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/SVG board · 47 exports | Tsunagi's drawing: a board as SVG text, with its colour sets, its boards, the style that gives the drawing its look, and where everything sits in it (so a page can tell which cell a finger is over). | 13.7 kB |
@johnmorrisdotca/Playable board · 16 exports | Tsunagi, played in a page: mountTsunagi draws a level into any element and plays it by touch and mouse, with Undo, Restart, Check and Cheat, the zoom pad for big boards, and the words in English and Japanese. | 24.7 kB |
@johnmorrisdotca/Board element · 4 exports | 251.5 kB | |
@johnmorrisdotca/Register the board · 4 exports | Defines the <tsunagi-board> element on the page. | 251.5 kB |
@johnmorrisdotca/Load level collections · 20 exports | 223.7 kB | |
@johnmorrisdotca/4 × 4 levels · 1 exports | 2.1 kB | |
@johnmorrisdotca/5 × 5 levels · 1 exports | 4.3 kB | |
@johnmorrisdotca/6 × 6 levels · 1 exports | 6.0 kB | |
@johnmorrisdotca/7 × 7 levels · 1 exports | 8.3 kB | |
@johnmorrisdotca/8 × 8 levels · 1 exports | 11.0 kB | |
@johnmorrisdotca/9 × 9 levels · 1 exports | 14.2 kB | |
@johnmorrisdotca/10 × 10 levels · 1 exports | 8.6 kB | |
@johnmorrisdotca/11 × 11 levels · 1 exports | 5.1 kB | |
@johnmorrisdotca/12 × 12 levels · 1 exports | 13.3 kB | |
@johnmorrisdotca/13 × 13 levels · 1 exports | 13.3 kB | |
@johnmorrisdotca/14 × 14 levels · 1 exports | 14.4 kB | |
@johnmorrisdotca/15 × 15 levels · 1 exports | 15.2 kB | |
@johnmorrisdotca/20 × 20 levels · 1 exports | 19.0 kB | |
@johnmorrisdotca/25 × 25 levels · 1 exports | 31.9 kB | |
@johnmorrisdotca/30 × 30 levels · 1 exports | 40.0 kB | |
@johnmorrisdotca/Boards without answers · 2 exports | 82.6 kB | |
@johnmorrisdotca/Portal levels · 1 exports | 16.3 kB | |
@johnmorrisdotca/Difficulty and lesson marks · 3 exports | EVERY TSUNAGI LEVEL'S DIFFICULTY, 1 TO 5: one digit a level, level 1 first, from its measured score (difficulty.ts) among every level of its size — the marks the row under a board shows. | 1.2 kB |
@johnmorrisdotca/Level-number migration · 2 exports | 1.0 kB | |
@johnmorrisdotca/Rules, solvers and generation · 167 exports | Tsunagi: join each pair of marbles with a line, every line its own, filling the board. | 22.4 kB |
Guides
How-to
- Load levels and identify boardsLoad levels by size, check a board on the server without its answer, and keep numbers and codes stable.
- Play strokes and retain progressPlay with press, drag and lift, count strokes and explosions, and restore progress on the same board.
- Draw and embed a native boardDraw a board as SVG, mount a playable board, and keep the embed contract.
- Solve and generate with a budgetCount solutions within a budget, tell a proof from a give-up, and generate candidates with limits.
- Daily levels, blocks and assistancePick a daily level by UTC date, follow the 16-level blocks, and record assistance correctly.
Explanation
- Codes, steps and native twistsRead and write board codes, keep twist rules in their own suffixes, and tell an answer from progress.
- Level data and proof workflowSee how level data, generation and proofs are kept apart, and why the generator is the source of truth.