SyntaxSquad/DADProject#16 fix: Cancle and Return is working and some other fixes involving game duration
This commit is contained in:
@@ -96,6 +96,7 @@ const performGameEnd = (io, game, gameId, winnerId, loserId, reason) => {
|
||||
action: "game_ended",
|
||||
winnerId: parseInt(winnerId),
|
||||
loserId: parseInt(loserId),
|
||||
totalTime: game.startTime ? Math.floor((Date.now() - game.startTime) / 1000) : 0,
|
||||
isDraw: false,
|
||||
player1_points: game.players[Object.keys(game.players)[0]]?.points || 0,
|
||||
player2_points: game.players[Object.keys(game.players)[1]]?.points || 0,
|
||||
|
||||
Reference in New Issue
Block a user