feat(ttt): added concede detection and move timeout
This commit is contained in:
parent
350c5bf4fc
commit
43e6ec24f5
5 changed files with 109 additions and 67 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue