Files
ftcandClaude Opus 5 c60fbcbb94 M2: бот и headless-прогон матчей
- PlayerView: проекция состояния, в которой боту видно только то,
  что видно живому игроку (своя рука, стол, размеры чужих рук, счётчики)
- BasicBot: политика из GAMEPLAY.md, полностью детерминированная
- Match: обёртка с состоянием и подпиской на события (её же возьмёт UI)
- runMatch: прогон матча без движка и без таймеров
- soak-тесты: 3500 полных матчей (боты и случайные легальные ходы,
  2-4 игрока), инварианты состояния проверяются после каждого действия
- npm run stats:bot — распределение исходов самоигры

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 10:43:06 +03:00

16 lines
471 B
TypeScript

import { Action } from '../rules/Action';
import { PlayerView } from './PlayerView';
/**
* A decision maker for one seat.
*
* Synchronous and pure: given the same view, a bot returns the same action.
* Any pacing — the pause that makes a bot feel like it is thinking — belongs to
* the presentation layer, not here.
*/
export interface Bot {
readonly name: string;
/** Must return one of `view.legalActions`. */
decide(view: PlayerView): Action;
}