From fb6566fac935fa102ae3041425efc0e15be38a79 Mon Sep 17 00:00:00 2001 From: apetitco Date: Mon, 22 Dec 2025 19:41:10 +0100 Subject: [PATCH] (tic-tac-toe): Extended `setGameOutcome` to include player details in database insertion --- src/@shared/src/database/mixin/tictactoe.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@shared/src/database/mixin/tictactoe.ts b/src/@shared/src/database/mixin/tictactoe.ts index 656ba04..18e5305 100644 --- a/src/@shared/src/database/mixin/tictactoe.ts +++ b/src/@shared/src/database/mixin/tictactoe.ts @@ -14,9 +14,9 @@ export const TicTacToeImpl: Omit = { * @param gameId The game we want to write the outcome of. * */ - setGameOutcome(this: ITicTacToeDb, id: GameId, outcome: string): void { + setGameOutcome(this: ITicTacToeDb, id: GameId, player1: string, player2: string, outcome: string): void { // Find a way to retrieve the outcome of the game. - this.prepare('INSERT INTO tictactoe (game, outcome) VALUES (@id, @outcome)').run({ id }); + this.prepare('INSERT INTO tictactoe (id, player1, player2, outcome) VALUES (@id, @player1, @player2, @outcome)').run({ id, player1, player2, outcome }); }, /** * whole function description