@nodots-llc/backgammon-ai
Version:
AI and integration for nodots-backgammon using the @nodots-llc/gnubg-hints native addon.
25 lines • 1.06 kB
TypeScript
/**
* Robot Turn Execution with GNU Backgammon
*
* This module contains GNU-specific logic for executing complete robot turns.
* It was moved from @nodots-llc/backgammon-core to maintain separation of concerns
* and keep GNU dependencies isolated to the AI package.
*/
import { BackgammonGameMoving, BackgammonGameRolling } from '@nodots-llc/backgammon-types';
/**
* Execute a complete robot turn using GNU Backgammon hints
*
* This function:
* 1. Initializes GNU Backgammon engine
* 2. Requests hints for the current position
* 3. Executes the top-ranked move sequence
* 4. Transitions game state to rolling for next player
*
* @param game - Game in moving state with robot as active player
* @returns Game in rolling state ready for next player
* @throws Error if gnuPositionId is missing
* @throws Error if GNU Backgammon returns no hints
* @throws Error if move execution fails
*/
export declare const executeRobotTurnWithGNU: (game: BackgammonGameMoving) => Promise<BackgammonGameRolling>;
//# sourceMappingURL=robotExecution.d.ts.map