# Changelog

All notable changes to this project are written here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
[Semantic Versioning](https://semver.org/).

## [Unreleased]

## [1.4.0] - 2026-11-02

### Added

- **Nine Men's Morris** (`nineMensMorris`), the forty-ninth game: nine men each, laid and then moved along the lines of three squares joined at their sides, three in a line taking a man of the other side's, and a side brought down to two men, or with no move, losing; a side down to three may fly. A new mechanic, the mill: `spec.mills`, `state.pendingRemoval`, the win reason `reduced` and the move kind `remove`. While a man is owed, `isLegalMove`, `legalPoints` and `playMove` read the point played as the man to take, so a replay and a bot have one way to say it. `boardSvg` draws its board.
- **Breakthrough** (`breakthrough`), **Lines of Action** (`linesOfAction`) and **Amazons** (`amazons`), the fiftieth to fifty-second: men set out from the start, moved by their own rules, and won by reaching the far row, by joining all your men, or by leaving the other side no move. One new spec field, `spec.movers`, the win reasons `reached` and `joined`, the move kind `shoot` and, for Amazons' arrow, `state.pendingShot`: while it is owed, `legalPoints` and `playMove` read the point played as where the arrow lands.

## [1.3.1] - 2026-10-31

### Changed

- Biome replaces ESLint as the formatter and linter, with the family's shared settings in `scripts/biome-family.json`; `pnpm lint` checks formatting too, and `pnpm format` applies it. The code is formatted once to 120 columns. Nothing a user of the package sees has changed.
- TypeScript targets ES2022 and refuses switch fallthrough and unmarked overrides.
- `pnpm check` also holds every source file to at most 500 lines of code (`scripts/check-size.mjs`; blank lines, comments, tests and data files are not counted). The variants table lives in `variantSpecs.ts`.

## [1.3.0] - 2026-10-14

The board is an element with the family's standard embed attributes and a shared builder, the Go rules have a named entry point, and the package has an English and Japanese documentation site with a checked example for every export. The rules, moves, records and the existing imports are unchanged.

### Added

- Add the bilingual documentation site, checked examples, paired guides, local search and machine-readable pages. Give the existing Go rules import a named entry for its documentation; keep wildcard imports available.
- Add a board-position and move-replay element, the shared embed builder and a validated iframe route. The native engine and SVG writer retain all rules and rendering; replay controls, reflected properties, host options and composed events are available.
- Share a package-independent embed builder for option controls, preview adapters, code tabs and shareable links.

### Changed

- Synchronize documentation tooling for repository layouts, generated type references, Node entry points and repository-specific README links.
- Keep large documentation resource catalogues on the entry index and the active resource beside core navigation, preserving every reference page; render valid default imports in HTML and Markdown.
- Group the package family by kind, alphabetize each group, and include the geography packages and REST in Pieces in the shared footer and README.
- Update the shared family description for addresses in all seven supported countries, including France and Germany.

## [1.2.2] - 2026-10-06

Nothing that was exported has changed.

### Changed

- The README takes the family's one layout, fully: a hero picture of the demo on a desk and on a phone in light and dark, a picture of nine of the games (gomoku, Drop Four, Reversi, Go, Hex, checkers, Chinese Checkers, Honeycomb and Twist Five) each drawn by `boardSvg`, an Install section, an Examples section of thirteen examples whose output is what they print, and an Accessibility section. Its pictures are in `docs/images` (WebP, light and dark) and are retaken with `pnpm screenshots:readme` (it replaces `pnpm pictures`, `docs/desktop.jpg`, `docs/phone.jpg` and the animated `docs/games.gif`, which the standard's pictures take the place of); they are not in the tarball, and `pnpm test:package` fails if one is.
- `pnpm test:readme` type-checks and runs every TypeScript and JavaScript example in the README against the built package, as a CI job of its own, and `pnpm check` holds the README to the family's lint (sections in order, a language on every fence, pictures with alt text, widths and captions, no marketing words, at most 64,000 characters, because npm shows only the first 65,536).
- "The family" is now under "Where it comes from, and where it is used", with "Used by", and the README has a Development and an Accessibility section.
- Repository only: the package and everything it exports are unchanged. `CONTRIBUTING.md` is the family's one text with a section of its own for Narabe, held to the master in johnmorrisdotca/.github by `src/family.test.js`; `ci.yml` and `pages.yml` are the family's one text (`pnpm check`, the demo, and the package on Linux, macOS and Windows), and any jobs of the package's own after them.
- The demo's page titles read `Narabe · pitch`, like the rest of the family's.
- The demo's own stylesheet is `demo/narabe.css`, named for the package like the family's.
- The README's badges use the family's green, and the marks the demo draws on a stone (a king's ring, a stone's edge, a lit cell) are named in `demo/narabe.css` instead of written into the drawing code.

### Fixed

- The API reference page wraps a long entry path instead of running about 2 px wider than a 360 px screen. Nothing the package exports has changed.

## [1.2.1] - 2026-10-05

Nothing that was exported has changed.

### Added

- A test holds every `@johnmorrisdotca/narabe@N` version pin in the README to this package's major version.

### Changed

- The family's list, in the README and in the demo's footer, names all twenty-four packages, Karakuri and Houseki included.
- The npm description is one sentence of 250 characters or fewer, so npm and its search show it whole; it is also the repository's About text. `homepage` is the demo site and `author` is `"John Morris"`, the same in every package.
- The GitHub Actions workflows use the current versions of the actions (checkout 7, setup-node 7, pnpm/action-setup 6; configure-pages 6, upload-pages-artifact 5 and deploy-pages 5 for Pages), which clears GitHub's Node 20 deprecation warning.

## [1.2.0] - 2026-10-01

### Changed

- **Needs Node 22 or later; Node 20 is no longer supported.** Nothing else changed.

## [1.1.0] - 2026-10-01

Nothing about play changed: every rule, every legal move and every result is exactly as in 1.0.0. These are additions beside the engine.

### Added

- **A command line**, `narabe`: `games`, `board`, `play`, `replay` and
  `simulate`, in English and Japanese. It plays random moves through the
  engine and decides nothing itself, and a game it plays can be saved with
  `--record` and read back with `replay`. The same seed plays the same game on
  every machine. The Japanese has not yet been read by a native reader
  (`docs/strings-ja.md`).
- **`boardSvg`**, from `@johnmorrisdotca/narabe/draw`: a position as one SVG
  string, drawn the way its game is traditionally drawn, in colours a page can
  restyle with `--nb-` variables.
- `NARABE_VERSION` (`@johnmorrisdotca/narabe/version`), `test:package` and a
  three-system package check in CI and in the release, issue templates, a
  SECURITY policy, and a `docs.test.js` that holds the README's counts, tables
  and examples to the code.

### Changed

- The demo is on the family's standard: the shared header and footer, English
  and Japanese (the Japanese, including the rule of each of the forty-eight
  games, not yet read by a native reader), the family's cloth patches behind
  the board, and an API reference page in the same frame. It is tested in a
  real browser on a phone and a desk (`pnpm test:demo`). The package itself
  is unchanged.

- **A Help switch in the demo.** Beside the language chooser in the family header, shared by every demo. Off (the default) the page is as it was; on, each option row (the game, the board and opponent, the buttons, the colour to place) says in one plain line what it does, in English or Japanese, and every button in it has the same words as its hover text. Kept on the device.

## [1.0.0] - 2026-09-30

### Added

- Forty-eight games on one engine, each a row in `VARIANT_SPECS`: eight
  five-in-a-row games (gomoku, tournament gomoku, renju, omok, Caro, Connect6,
  Misère Five, Hex Five), two capture games (Ninuki- and Sannuki-renju), eight
  drop games from Drop Four to Wormhole Drop, six small-board games including
  tic-tac-toe and Notakto, eight strange-board games (a torus, rocks, dominoes,
  falling blocks, quarter turns), six flipping games from Reversi to the
  hexagonal Honeycomb, Halma and Chinese Checkers, Hex, Go, and checkers with
  five draughts rule sets.
- `createGame`, `playMove`, `movePiece`, `placePiece`, `twistBoard`,
  `passTurn`, `undoMove` and the rest: every move returns a new state and an
  illegal one returns the state unchanged.
- `turnChoices`, which says what the player to move may do in any game.
- Seven opening protocols, handicaps, head starts, a draw limit, seats that
  can be swapped, boards that grow and shrink.
- Records as move lists: `replayMoves`, `replayGame` and `replayTimeline`,
  with `pointName` and the rest of the notation.
- `useNarabe`, a React hook, from `@johnmorrisdotca/narabe/react`.
- A simulator that plays every game to its end and re-checks each move against
  the rules restated by hand.
- A demo that plays any of the games on one screen, published to GitHub Pages.
- Every module is its own entry point (`@johnmorrisdotca/narabe/rules/lines`
  and so on), `test-support` builds positions for tests, `simulation/headStartDecides`
  measures whether a head start settles a game, and the source and its tests
  ship in the package beside the build.

[Unreleased]: https://github.com/johnmorrisdotca/narabe/compare/v1.4.0...HEAD
[1.4.0]: https://github.com/johnmorrisdotca/narabe/compare/v1.3.1...v1.4.0
[1.3.0]: https://github.com/johnmorrisdotca/narabe/compare/v1.2.2...v1.3.0
[1.2.1]: https://github.com/johnmorrisdotca/narabe/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/johnmorrisdotca/narabe/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/johnmorrisdotca/narabe/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/johnmorrisdotca/narabe/releases/tag/v1.0.0
