Repository navigation
Add Colorfield (experimental) - #535
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147JhoW1wYn2oDdUYjhTaha
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Colorfield is Mark Steere's dot connection and enclosure game (August 2026). Red and Blue take turns drawing unit segments on a grid of dots. An enclosed region goes to whoever has more segments bordering it, and an enclosure with an equal number of red and blue bordering segments must not be formed. The game is also played on 3D and 4D grids. Rules: https://www.marksteeregames.com/Colorfield_rules.pdf
src/games/colorfield.ts: the game, with seven boards as variants (2D 6x6 as the default, 8x8, 10x10, 12x12, 3D 4x4x2 and 6x6x2, 4D 4x4x2x2). Flags experimental, pie, autopass, scores. The board is drawn with the freespace renderer to look like the designer's web app (https://www.marksteeregames.com/Colorfield_play.html), and a click selects the nearest segment. A black dotted line marks a segment the player to move must not draw. The display option "stacked" puts Board 2 of the 4D grid below Board 1 for narrow screens. A segment is written as its two dots (a1-b1). The name of a back dot ends in z, and the name of a dot of Board 2 ends in w.test/games/colorfield.test.ts: 42 tests. Every figure of the rule sheet is a fixture, and the tests assert the numbers stated in the sheet's text.gameApgamesEn/gameApresultsEn, merged withnpm run locale-en -- merge --write. CHANGELOG[Unreleased].Checks on develop 2c625eb with this change:
npm test(3,089 passing), lint, test:scripts, the build with check-registry, and test:postbuild. Checked against the rules engine of the web app on 18,090 random games on the seven boards: no difference, no deadlock, no tie.🤖 Generated with Claude Code
https://claude.ai/code/session_0147JhoW1wYn2oDdUYjhTaha