From 2fa708862d24ff011cb40c9c370dd52de8fa9519 Mon Sep 17 00:00:00 2001 From: hugomanipoud2 Date: Thu, 22 May 2025 20:28:57 +0200 Subject: [PATCH] few docstrings --- OOP_3B5_Project/src/backend/Move.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OOP_3B5_Project/src/backend/Move.java b/OOP_3B5_Project/src/backend/Move.java index a14e428..aea4765 100644 --- a/OOP_3B5_Project/src/backend/Move.java +++ b/OOP_3B5_Project/src/backend/Move.java @@ -37,7 +37,7 @@ public class Move { needPieceDeletion(toX, toY); //if a piece is at arrival coord, remove the piece } specialMoves.pawnPromotion(movingPiece, toY); - specialMoves.setCastlingVariable(movingPiece, toX, toY); + specialMoves.castling(movingPiece, toX, toY); movingPiece.setX(toX); // change coordinates to the new coordinate movingPiece.setY(toY); board.setTurnNb(turnNb + 1); @@ -369,14 +369,14 @@ public boolean isKingMoveValid(int x, int y, boolean color, int selectX, int se } if (color == true) { // for white king if ((selectX == x - 3 && selectY == y)) { - return specialMoves.shortCastle(myPiece); + return specialMoves.shortCastleHighlight(myPiece); } // else if ((selectX == x + 4 && selectY == y)) { // return specialMoves.longCastle(myPiece); // } }else { if ((selectX == x - 3 && selectY == y)) { - return specialMoves.shortCastle(myPiece); + return specialMoves.shortCastleHighlight(myPiece); } } return false;