Skip to content

Commit

Permalink
Fixed bug that wouldn't let you submit a game conclusion where it's e…
Browse files Browse the repository at this point in the history
…ither a draw or you won.
  • Loading branch information
Naviary2 committed Jul 15, 2024
1 parent b1e8abd commit 4a8ff6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/game/gamemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,8 @@ const gamemanager = (function() {
if (!wincondition1.isGameConclusionDecisive(condition)) return false; // either resignation, time, or disconnect, or whatever nonsense they specified, none of these which the client can claim the win from (the server has to tell them)
// Game conclusion is decisive...
// We can't submit a move where our opponent wins
if (victor === color || victor === 'draw') return false;
const oppositeColor = math1.getOppositeColor(color);
if (victor === oppositeColor) return false;

return true;
}
Expand Down

0 comments on commit 4a8ff6e

Please sign in to comment.