Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
Merge pull request #46 from rafaeldamasceno/fix/chess-board-broadcast
Browse files Browse the repository at this point in the history
Fix chess board broadcast
  • Loading branch information
Quackster authored Jun 27, 2024
2 parents 17284fa + b233bdd commit b64de80
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,17 @@ public void handleCommand(Player player, Room room, Item item, String command, S
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;
}

Expand Down

0 comments on commit b64de80

Please sign in to comment.