Skip to content

refactor(game): extract robot.ts (Phase 6 of #132) - #141

Merged
nodots merged 1 commit into
refactor/game-decomp-phase4-lifecyclefrom
refactor/game-decomp-phase6-robot
Jul 15, 2026
Merged

refactor(game): extract robot.ts (Phase 6 of #132)#141
nodots merged 1 commit into
refactor/game-decomp-phase4-lifecyclefrom
refactor/game-decomp-phase6-robot

Conversation

@nodots

@nodots nodots commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Phase 6 of the Game/index.ts decomposition epic (#133)

Stacked on #140 (Phase 5). Retarget to development as parents merge.

What changed

  • New src/Game/robot.ts holds handleRobotMovedState and confirmTurnWithRobotAutomation as free functions. Both call confirmTurn imported from turnFlow (Rule A: no facade round-trip).
  • Public Game.* statics delegate via public static X = X. executeRobotTurn stays as its existing re-export from ./executeRobotTurn.
  • Removed now-dead imports (debug, BackgammonGameMoved).

Verification

  • tsc -b --force clean
  • npx jest: 475 passed / 12 skipped (unchanged)
  • Public API unchanged; index.ts now 539 lines

Refs #132

Move handleRobotMovedState and confirmTurnWithRobotAutomation into
src/Game/robot.ts as free functions. Both call confirmTurn imported from
turnFlow (Rule A: no facade round-trip). Public Game.* statics delegate
via 'public static X = X'. executeRobotTurn stays as its existing
re-export from ./executeRobotTurn.

Removed now-dead imports from index.ts (debug, BackgammonGameMoved).

Faithful move; behavior unchanged. Core: 475 passed / 12 skipped,
tsc -b clean.

Refs #132
Base automatically changed from refactor/game-decomp-phase5-turnflow to refactor/game-decomp-phase4-lifecycle July 15, 2026 18:36
@nodots
nodots merged commit 3c23139 into refactor/game-decomp-phase4-lifecycle Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant