Skip to content

Add Letter Triangles game with seeded generation and tests#293

Open
ianfhunter wants to merge 8 commits intomainfrom
codex/create-letter-triangles-game
Open

Add Letter Triangles game with seeded generation and tests#293
ianfhunter wants to merge 8 commits intomainfrom
codex/create-letter-triangles-game

Conversation

@ianfhunter
Copy link
Owner

Motivation

  • Add a new puzzle type (Letter Triangles) to the Word Games pack that provides a reproducible, seed-driven triangular tile-placement word puzzle.
  • Ensure puzzles are generatable and testable deterministically and integrate cleanly with existing game UI patterns (SeedDisplay, GiveUpButton, GameResult).

Description

  • Added a new game page and UI: src/pages/LetterTriangles/LetterTriangles.jsx with supporting stylesheet LetterTriangles.module.css and README.md documenting rules.
  • Implemented puzzle generation and helper logic in src/pages/LetterTriangles/letterTrianglesLogic.js with a seeded backtracking search over dictionary word pools and a deterministic fallback layout when dictionary matching fails.
  • Registered the game in the Word Games pack and routing: src/packs/word-games/manifest.js and src/App.jsx, and added an SVG icon asset src/assets/icons/letter-triangles.svg.
  • Added i18n strings for English and Spanish (src/i18n/locales/en.json, src/i18n/locales/es.json) and a Vitest test file src/pages/LetterTriangles/LetterTriangles.test.js validating determinism, length invariants, line reconstruction, and solved-state detection.

Testing

  • Ran npm run test:run -- src/pages/LetterTriangles/LetterTriangles.test.js and the new generator/tests passed (4 tests all green).
  • Ran npm run test:run -- src/tests/gameReadmeCheck.test.js and npm run test:run -- src/tests/gameModuleImports.test.js, both of which passed to confirm README presence and module importability.
  • Ran npm run lint which surfaced many pre-existing repo lint errors unrelated to this change, so lint is noted but not blocking this PR.

Codex Task

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant