clone

fifteen puzzle games for the terminal, with daily puzzles, weekly ladders and xp, built on bubble tea

docs updates

Dami committed 7d01c02
commit
7d01c023feb3e18f995757261aecb2c90689e2db
parent
58c408d991d88bf4dc958be282e713a95763026b
author
Dami <dami.etoile@gmail.com>
28 files changed, +103 -49
MREADME.md54+++++++++++++++++++-----------
Mfillomino/README.md27++++++++++++++-
Mfillomino/help.md3+-
Mhashiwokakero/README.md2+-
Mhashiwokakero/help.md3+-
Mhitori/README.md2+-
Mhitori/help.md3+-
Mlightsout/README.md2+-
Mlightsout/help.md2+-
Mnonogram/README.md1-
Mnonogram/help.md2+-
Mnurikabe/README.md1-
Mnurikabe/help.md2+-
Mrippleeffect/README.md24+++++++++++++-
Mrippleeffect/help.md2+-
Mshikaku/README.md1-
Mshikaku/help.md2+-
Mspellpuzzle/help.md2+-
Msudoku/README.md1-
Msudoku/help.md2+-
Msudokurgb/README.md1-
Msudokurgb/help.md2+-
Mtakuzu/README.md1-
Mtakuzu/help.md2+-
Mtakuzuplus/README.md3--
Mtakuzuplus/help.md2+-
Mwordsearch/README.md1-
Mwordsearch/help.md2+-
M README.md +34 -20
@@ -2,19 +2,19 @@
22 33 A terminal-based puzzle game collection built with [Bubble Tea](https://github.com/charmbracelet/bubbletea).44 5-Twelve puzzle types, multiple difficulty modes, daily and weekly deterministic challenges, XP progression, 365 color themes, and an explicit game catalog for adding new games.5+Fourteen puzzle games, multiple difficulty modes, daily and weekly deterministic challenges, XP progression, 365 theme options, and an explicit built-in registry plus metadata catalog for adding new games.66 77 ![PuzzleTea menu](vhs/menu.gif)88 99 ## Features1010 11-- **13 puzzle games** -- Fillomino, Nonogram, Nurikabe, Ripple Effect, Sudoku, Shikaku, Spell Puzzle, Word Search, Hashiwokakero, Hitori, Lights Out, Takuzu, Takuzu+11+- **14 puzzle games** -- Fillomino, Nonogram, Nurikabe, Ripple Effect, Shikaku, Sudoku, Sudoku RGB, Spell Puzzle, Word Search, Hashiwokakero, Hitori, Lights Out, Takuzu, Takuzu+1212 - **Daily puzzles** -- A unique puzzle generated each day using deterministic seeding. Same date, same puzzle for everyone. Streak tracking rewards consecutive daily completions.1313 - **Weekly gauntlet** -- Each ISO calendar week has a shared 99-puzzle ladder. The current week unlocks sequentially from `#01` to `#99`; past weeks can be reviewed from completed saves only.1414 - **XP and leveling** -- Per-category levels based on victories. Harder modes yield more XP. Daily puzzles grant 2x XP, and weekly puzzles add slot-based bonus XP.1515 - **Stats dashboard** -- Profile level, daily streak status, weekly completion progress, victory counts, and XP progress bars per category.1616 - **365 color themes** -- Live-preview theme picker with WCAG-compliant contrast enforcement. Dark and light themes included.17-- **Mouse support** -- Click and drag in Nonogram, Nurikabe, Shikaku, Spell Puzzle, and Word Search. Lights Out supports click-to-toggle.17+- **Mouse support** -- Drag interactions in Nonogram, Nurikabe, Shikaku, Spell Puzzle, and Word Search; click-to-focus in Fillomino, Hashiwokakero, Hitori, Sudoku, Sudoku RGB, Takuzu, and Takuzu+; click-to-toggle in Lights Out.1818 - **Seeded puzzles** -- Share a seed string to generate identical puzzles across sessions and machines.1919 - **Save/load persistence** -- Games auto-save to SQLite. Resume any in-progress game by name.2020
@@ -23,13 +23,14 @@ Twelve puzzle types, multiple difficulty modes, daily and weekly deterministic c
2323 | Game | Description | Modes |2424 |------|-------------|-------|2525 | **Fillomino** | Grow numbered regions to their exact sizes | Mini 5x5 through Expert 12x12 |26-| **Nonogram** | Fill cells to match row and column hints | Easy/Medium/Hard across 5x5, 10x10, 15x15, 20x20 |26+| **Nonogram** | Fill cells to match row and column hints | 10 named modes from 5x5 `Mini` to 20x20 `Massive` |2727 | **Nurikabe** | Build islands while keeping one connected sea | 5 modes from 5x5 to 12x12 |2828 | **Ripple Effect** | Place digits in cages without violating ripple distance | Mini 5x5 through Expert 9x9 |29-| **Shikaku** | Divide grid into rectangles matching cell counts | 5 modes from 7x7 to 11x11 |29+| **Shikaku** | Divide grid into rectangles matching cell counts | Mini 5x5 through Expert 12x12 |3030 | **Sudoku** | Classic 9x9 grid | Beginner, Easy, Medium, Hard, Expert, Diabolical |31+| **Sudoku RGB** | Fill a 9x9 grid with three symbols so each row, column, and box contains three of each | Beginner, Easy, Medium, Hard, Expert, Diabolical |3132 | **Spell Puzzle** | Connect letters to reveal crossword words and bonus anagrams | Beginner, Easy, Medium, Hard |32-| **Word Search** | Find hidden words in a letter grid | Easy, Medium, Hard (3-8 directions) |33+| **Word Search** | Find hidden words in a letter grid | Easy 10x10, Medium 15x15, Hard 20x20 |3334 | **Hashiwokakero** | Connect islands with bridges | 12 modes across 7x7 to 13x13 grids |3435 | **Hitori** | Shade cells to eliminate duplicates | 6 modes from 5x5 to 12x12 |3536 | **Lights Out** | Toggle lights to turn all off | Easy (3x3) to Extreme (9x9) |
@@ -99,15 +100,19 @@ that week. Current-week puzzles unlock one at a time; older weeks are review-onl
99100 Start a new game directly:100101 101102 ```bash102-puzzletea new nonogram medium103+puzzletea new nonogram classic103104 puzzletea new fillomino "Hard 10x10"104105 puzzletea new ripple-effect "Medium 7x7"105106 puzzletea new sudoku hard107+puzzletea new ripeto expert106108 puzzletea new spell beginner107109 puzzletea new lights-out108-puzzletea new hashi easy110+puzzletea new hashi "Easy 7x7"109111 ```110112 113+Mode names are matched case-insensitively after normalizing spaces, hyphens,114+and underscores. Multi-word mode titles usually need quotes.115+111116 Resume and manage saved games:112117 113118 ```bash
@@ -167,13 +172,13 @@ puzzletea --theme "Catppuccin Mocha"
167172 Flag aliases on the root command also work:168173 169174 ```bash170-puzzletea --new nonogram:medium175+puzzletea --new nonogram:classic171176 puzzletea --continue amber-falcon172177 ```173178 174179 ### CLI Aliases175180 176-Several shorthand names are accepted for games: `polyomino`/`regions` for Fillomino, `hashi`/`bridges` for Hashiwokakero, `lights` for Lights Out, `islands`/`sea` for Nurikabe, `ripple` for Ripple Effect, `spell`/`spellpuzzle` for Spell Puzzle, `binairo`/`binary` for Takuzu, `binario+` for Takuzu+, `words`/`ws` for Word Search, `rectangles` for Shikaku.181+Several shorthand names are accepted for games: `polyomino`/`regions` for Fillomino, `hashi`/`bridges` for Hashiwokakero, `lights` for Lights Out, `islands`/`sea` for Nurikabe, `ripple` for Ripple Effect, `spell`/`spellpuzzle` for Spell Puzzle, `rgb sudoku`/`ripeto`/`sudoku ripeto` for Sudoku RGB, `binairo`/`binary` for Takuzu, `takuzu plus`/`binario+`/`binario plus` for Takuzu+, `words`/`wordsearch`/`ws` for Word Search, and `rectangles` for Shikaku.177182 178183 ## Controls179184
@@ -185,7 +190,6 @@ Several shorthand names are accepted for games: `polyomino`/`regions` for Fillom
185190 | `Escape` | Return to the menu or go back |186191 | `Ctrl+R` | Reset puzzle |187192 | `Ctrl+H` | Toggle full help |188-| `Ctrl+E` | Toggle debug overlay |189193 | `Ctrl+C` | Quit |190194 191195 ### Navigation
@@ -194,7 +198,7 @@ Arrow keys, WASD, and Vim bindings (`hjkl`) are supported for grid movement acro
194198 195199 ### Mouse196200 197-Nonogram, Nurikabe, Shikaku, Spell Puzzle, and Word Search support click and drag. Lights Out supports click to toggle. See each game's help for details.201+Nonogram, Nurikabe, Shikaku, Spell Puzzle, and Word Search support drag interactions. Fillomino, Hashiwokakero, Hitori, Sudoku, Sudoku RGB, Takuzu, and Takuzu+ support mouse focus or click-to-cycle interactions. Lights Out supports click to toggle. See each game's help for details.198202 199203 ## Game Persistence200204
@@ -321,7 +325,7 @@ All code must pass `gofumpt` and `golangci-lint` before committing. CI runs both
321325 322326 ## Adding a New Puzzle323327 324-PuzzleTea uses an explicit game catalog. To add a new puzzle type:328+PuzzleTea uses an explicit built-in registry plus a metadata catalog. To add a new puzzle type:325329 326330 ### 1. Create the game package327331
@@ -329,21 +333,26 @@ Create a directory (e.g., `mypuzzle/`) with these files:
329333 330334 | File | Purpose |331335 |------|---------|332-| `Gamemode.go` | Mode struct embedding `game.BaseMode`, `Spawn()`, `Modes`/`DailyModes`, and package-level `Definition` metadata |333-| `Model.go` | `Model` struct implementing `game.Gamer` |334-| `Export.go` | `Save` struct, `GetSave()`, `ImportModel()` for persistence |336+| `gamemode.go` | Mode structs embedding `game.BaseMode`, `Modes`, `ModeDefinitions`, package-level `Definition`, and the built-in `Entry` |337+| `model.go` | `Model` struct implementing `game.Gamer` |338+| `export.go` | `Save` struct, `GetSave()`, `ImportModel()` for persistence |335339 | `keys.go` | Game-specific `KeyMap` struct |336340 | `style.go` | lipgloss styling and rendering helpers |337341 | `generator.go` | Puzzle generation logic (if applicable) |338342 | `grid.go` | Grid type and serialization (for grid-based games) |343+| `help.md` | Embedded rules/help content wired into the runtime entry |344+| `print_adapter.go` | Optional printable export adapter for JSONL/PDF support |339345 | `mypuzzle_test.go` | Tests (table-driven, save/load round-trip, generator validation) |340346 | `README.md` | Game docs: rules, controls table, modes table, quick start examples |341347 342-### 2. Wire it into the central catalog348+Use `gameentry.BuildModeDefs(Modes)` and `gameentry.NewEntry(...)` so the349+package exposes both metadata and its validated runtime wiring.350+351+### 2. Wire it into the built-in registry343352 344-Edit the central catalog once:353+Edit the built-in registry once:345354 346-- **`catalog/catalog.go`**: Import the package and add its exported `Definition` to `All` (maintain alphabetical order).355+- **`registry/registry.go`**: Import the package and add its exported `Entry` to `all` (maintain alphabetical order).347356 348357 The game package's `Definition` owns:349358
@@ -355,6 +364,9 @@ The game package's `Definition` owns:
355364 - help content356365 - save/import function357366 367+The `catalog` package is built from the registered entries and remains the pure368+metadata index for names, aliases, and daily-mode lookup.369+358370 ### 3. Add a VHS preview359371 360372 - Create `vhs/<game>.tape` following the format in existing tapes.
@@ -363,7 +375,9 @@ The game package's `Definition` owns:
363375 ### 4. Verify364376 365377 ```bash366-just fmt && just lint && just test378+just fmt379+just lint380+just test-short367381 ```368382 369383 See any existing game package (e.g., `nonogram/`) for the full pattern, and `AGENTS.md` for detailed conventions.
M fillomino/README.md +26 -1
M fillomino/help.md +2 -1
M hashiwokakero/README.md +1 -1
M hashiwokakero/help.md +2 -1
M hitori/README.md +1 -1
M hitori/help.md +2 -1
M lightsout/README.md +1 -1
M lightsout/help.md +1 -1
M nonogram/README.md +0 -1
M nonogram/help.md +1 -1
M nurikabe/README.md +0 -1
M nurikabe/help.md +1 -1
M rippleeffect/README.md +23 -1
M rippleeffect/help.md +1 -1
M shikaku/README.md +0 -1
M shikaku/help.md +1 -1
M spellpuzzle/help.md +1 -1
M sudoku/README.md +0 -1
M sudoku/help.md +1 -1
M sudokurgb/README.md +0 -1
M sudokurgb/help.md +1 -1
M takuzu/README.md +0 -1
M takuzu/help.md +1 -1
M takuzuplus/README.md +0 -3
M takuzuplus/help.md +1 -1
M wordsearch/README.md +0 -1
M wordsearch/help.md +1 -1