feat(ttt): added concede detection and move timeout

This commit is contained in:
Maieul BOYER 2026-01-07 20:44:23 +01:00 committed by Maix0
parent 350c5bf4fc
commit 43e6ec24f5
5 changed files with 109 additions and 67 deletions

View file

@ -1,4 +1,4 @@
import { type Socket } from 'socket.io-client';
import { Socket } from 'socket.io-client';
export type UpdateInfo = {
inQueue: number,
@ -14,7 +14,7 @@ export type GameUpdate = {
boardState: CellState[];
currentPlayer: 'X' | 'O';
gameState: 'winX' | 'winO' | 'concededX' | 'concededO' | 'draw' | 'ongoing';
gameState: 'winX' | 'winO' | 'draw' | 'ongoing' | 'other';
}
export type GameMove = {
@ -26,6 +26,7 @@ export interface ClientToServer {
dequeue: () => void;
debugInfo: () => void;
gameMove: (up: GameMove) => void;
keepalive: () => void;
connectedToGame: (gameId: string) => void;
};