From f6fc893027362e035598436d8a002b0ad30521c4 Mon Sep 17 00:00:00 2001 From: Ken Riley Date: Wed, 15 Jul 2026 10:14:09 -0600 Subject: [PATCH] refactor(game): prune dead type imports, finalize facade (Phase 7 of #132) After the module extractions, index.ts is a thin facade over shared/guards/undo/cube/lifecycle/turnFlow/robot. Remove type imports left dead by the moves: BackgammonCubeValue, BackgammonDieValue, BackgammonMoveSkeleton, BackgammonPlayerDoubled, BackgammonPlayerWinner, BackgammonRoll, BackgammonPlayersMovingTuple, BackgammonPlayersRollingTuple. Downstream guard: rebuilt core + typechecked consumers against local core -- ai (tsc -b) clean, api (tsc --noEmit) clean; client does not consume core at the type level. Game.* public API + signatures preserved throughout the epic. No behavior change. Core: 475 passed / 12 skipped, tsc -b clean. index.ts: 2491 -> ~530 lines across the epic. Refs #132, #133 --- src/Game/index.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Game/index.ts b/src/Game/index.ts index 6cfaf41..2f0996d 100644 --- a/src/Game/index.ts +++ b/src/Game/index.ts @@ -3,8 +3,6 @@ import { BackgammonChecker, BackgammonColor, BackgammonCube, - BackgammonCubeValue, - BackgammonDieValue, BackgammonGame, BackgammonGameDoubled, BackgammonGameMoving, @@ -12,19 +10,15 @@ import { BackgammonGameRolling, BackgammonGameRollingForStart, BackgammonGameStateKind, - BackgammonMoveSkeleton, BackgammonPlay, BackgammonPlayer, BackgammonPlayerActive, - BackgammonPlayerDoubled, BackgammonPlayerInactive, BackgammonPlayerMoving, BackgammonPlayerRolledForStart, BackgammonPlayerRolling, BackgammonPlayers, - BackgammonPlayerWinner, BackgammonPlayMoving, - BackgammonRoll, } from '@nodots/backgammon-types' import { generateId, Player } from '..' import { Board } from '../Board' @@ -72,10 +66,8 @@ export * from '../index' // Import tuple aliases from types package import type { BackgammonGameCompleted, - BackgammonPlayersMovingTuple, BackgammonPlayersRolledForStartTuple, BackgammonPlayersRollingForStartTuple, - BackgammonPlayersRollingTuple, } from '@nodots/backgammon-types' import { executeRobotTurn } from './executeRobotTurn'