Add game over check to chessboard script

An additional check has been added to the chessboard.js script in the ChessServer application. This check ensures that if the game is over, no further moves are allowed to be made, improving the game flow and overall user experience.
This commit is contained in:
Anduin
2024-06-21 14:41:17 +00:00
parent e0a8a833f2
commit e50b551260
@@ -68,6 +68,8 @@ const initGameBoard = function (color, player, gameId) {
if (game.turn() !== color) {
return;
}
if (game.isGameOver()) return;
var moves = game.moves({
square: square,