From 4a8ff6e53fcf44a77b3573f7bc332ea136158343 Mon Sep 17 00:00:00 2001 From: Naviary <163621561+Naviary2@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:30:47 -0600 Subject: [PATCH] Fixed bug that wouldn't let you submit a game conclusion where it's either a draw or you won. --- src/server/game/gamemanager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/game/gamemanager.js b/src/server/game/gamemanager.js index 8df5b942b..81a94c816 100644 --- a/src/server/game/gamemanager.js +++ b/src/server/game/gamemanager.js @@ -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; }