Skip to content

Design pattern refactor introducing a game variant system, strategy-based win detection, and safer public APIs.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 24 Jun 07:52
· 7 commits to main since this release
0dfa231

1.5.0 - 2026-06-24

Added

  • Game variant system with predefined variants selected via the variant option (GameVariant.CLASSIC_3X3)
  • Strategy pattern for game variants: resolveGameStrategy plus the classic3x3 strategy implementation
  • PlayerMoveStatus and BackToMoveStatus return values for savePlayerMove and backToMove
  • Object.freeze on board snapshots to prevent external mutations
  • JSDoc comments across core classes and public APIs
  • Test coverage for game strategy resolution, Board, constants, types, and public API

Changed

  • boardSize option deprecated; arbitrary board sizes are no longer supported in favor of predefined variant values
  • Type files moved to src/game/types/ and renamed to the .types.ts suffix for consistency
  • GameOptions type moved to src/game/types/Game.types.ts
  • tsup build split into separate CJS and ESM outputs
  • Project structure reorganized: Board.ts and Game.ts moved under src/game/
  • Winning combinations moved to strategy-specific constants

Removed

  • AUDIT.md (replaced by inline JSDoc documentation)