Skip to content

Audit fixes: deprecated API cleanup, configurable board size, `RESET` event payload, and improved game status handling.

Choose a tag to compare

@TenGosc007 TenGosc007 released this 18 May 19:41
· 19 commits to main since this release
bd7188d

1.2.1 - 2026-05-18

Added

  • Configurable board size via GameOptions (new Game({ boardSize: 16 })) — GameOptions exported from public API
  • getFieldByIndex and setFieldByIndex added to IBoard interface
  • Payload added to RESET event — GameEventMap[RESET] now uses optional GameEventPayload (no breaking change)
  • Getter board added to IGame

Fixed

  • savePlayerMove internally called deprecated isFieldSelected(index + 1) — now uses isFieldSelectedByIndex(index)
  • Both console.warn calls removed from savePlayerMove — PlayerMoveStatus return value is sufficient
  • _updateGameStatus failed to clear win/draw state on reset — removed if (isNotRunning) guard; reset() now calls _updateGameStatus() instead of setting status manually
  • EventEmit declared void return type — now generic EventEmit<T> used by IGame as EventEmit<this> for correct fluent API typing
  • Deprecated methods savePlayerSelection, isFieldSelected, getBoard marked @deprecated in IGame

Changed

  • Board accepts optional size parameter (defaults to 9)
  • Old IBoard methods marked @deprecated