diff --git a/src/backend/Board.java b/src/backend/Board.java index f8ecb5b..db232e1 100644 --- a/src/backend/Board.java +++ b/src/backend/Board.java @@ -449,7 +449,7 @@ public class Board { return; } - //get current piece coordinate + //gets current piece coordinate int fromX = move.piece.getX(); int fromY = move.piece.getY(); int toX = move.toX; @@ -479,7 +479,7 @@ public class Board { this.highlightedPositions.clear(); } - //manually check for victory if needed + //manually checks for victory if needed public boolean isCheckmate() { gameResult.checkForVictory(this); return gameResult.isGameOver(); diff --git a/src/backend/GameResult.java b/src/backend/GameResult.java index 1812295..4347ff8 100644 --- a/src/backend/GameResult.java +++ b/src/backend/GameResult.java @@ -1,7 +1,6 @@ package backend; // Class to track the outcome of a chess game - public class GameResult { private boolean gameOver = false; private boolean whiteWon = false; @@ -49,7 +48,7 @@ public class GameResult { return message; } - // Reset the game result to start a new game + // Reset the game result to start a new game public void reset() { gameOver = false; whiteWon = false; diff --git a/src/backend/VictoryChecker.java b/src/backend/VictoryChecker.java index 342860b..c649af6 100644 --- a/src/backend/VictoryChecker.java +++ b/src/backend/VictoryChecker.java @@ -10,7 +10,7 @@ public class VictoryChecker { // Check if a player has won the chess game via checkmate public static boolean checkVictory(Board board, boolean isWhitePlayer) { - // The opponent is the one who would be checkmated + // The opponent is the one who would be checkmated so opposite color boolean opponentColor = !isWhitePlayer; // Debug info