feat(ttt): added draw status in ttt match history

This commit is contained in:
Maix0 2026-01-07 00:16:39 +01:00 committed by Maix0
parent 830f251537
commit f87a991441
7 changed files with 36 additions and 17 deletions

View file

@ -104,7 +104,8 @@
"enum": [
"winX",
"winO",
"other"
"other",
"draw"
]
}
}

View file

@ -17,7 +17,7 @@ const TTTHistoryResponse = {
playerX: Type.Object({ id: Type.String(), name: Type.String() }),
playerO: Type.Object({ id: Type.String(), name: Type.String() }),
date: Type.String(),
outcome: Type.Enum(['winX', 'winO', 'other']),
outcome: Type.Enum(['winX', 'winO', 'other', 'draw']),
}),
),
}),

View file

@ -14,7 +14,7 @@ export type GameUpdate = {
boardState: CellState[];
currentPlayer: 'X' | 'O';
gameState: 'winX' | 'winO' | 'concededX' | 'concededO' | 'draw' | 'ongoing';
gameState: 'winX' | 'winO' | 'draw' | 'ongoing';
}
export type GameMove = {