Skip to content

Commit

Permalink
Merge pull request Infinite-Chess#87 from Supyovalk/patch-1
Browse files Browse the repository at this point in the history
Slightly Improved Game Conclusion Check
  • Loading branch information
Naviary2 authored Jul 15, 2024
2 parents 96b41c1 + 36f6aea commit e5e43cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/server/game/gamemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1224,9 +1224,7 @@ const gamemanager = (function() {
// Game conclusion is decisive...
// We can't submit a move where our opponent wins
const oppositeColor = math1.getOppositeColor(color);
if (victor === oppositeColor) return false;

return true;
return victor !== oppositeColor;
}

/**
Expand Down Expand Up @@ -1544,4 +1542,4 @@ const gamemanager = (function() {
})
})();

module.exports = gamemanager
module.exports = gamemanager

0 comments on commit e5e43cd

Please sign in to comment.