1
Fork 0
mirror of https://github.com/Quackster/Havana.git synced 2025-07-02 04:37:47 +00:00

Merge pull request #46 from rafaeldamasceno/fix/chess-board-broadcast

Fix chess board broadcast
This commit is contained in:
Quackster 2024-06-28 07:50:13 +10:00 committed by GitHub
commit b64de80951
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -167,14 +167,17 @@ public class GameChess extends GamehallGame {
if (this.board.isDraw()) {
this.gameFinished = true;
this.showChat("The chess game has ended in a draw");
this.broadcastMap();
return;
} else if (this.board.isStaleMate()) {
this.gameFinished = true;
this.showChat("The chess game has encountered a stalemate");
this.broadcastMap();
return;
} else if (this.board.isMated()) {
this.gameFinished = true;
this.showChat(player.getDetails().getName() + " has won the chess game");
this.broadcastMap();
return;
}