few docstrings
This commit is contained in:
parent
18c659e93d
commit
2fa708862d
|
|
@ -37,7 +37,7 @@ public class Move {
|
||||||
needPieceDeletion(toX, toY); //if a piece is at arrival coord, remove the piece
|
needPieceDeletion(toX, toY); //if a piece is at arrival coord, remove the piece
|
||||||
}
|
}
|
||||||
specialMoves.pawnPromotion(movingPiece, toY);
|
specialMoves.pawnPromotion(movingPiece, toY);
|
||||||
specialMoves.setCastlingVariable(movingPiece, toX, toY);
|
specialMoves.castling(movingPiece, toX, toY);
|
||||||
movingPiece.setX(toX); // change coordinates to the new coordinate
|
movingPiece.setX(toX); // change coordinates to the new coordinate
|
||||||
movingPiece.setY(toY);
|
movingPiece.setY(toY);
|
||||||
board.setTurnNb(turnNb + 1);
|
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 (color == true) { // for white king
|
||||||
if ((selectX == x - 3 && selectY == y)) {
|
if ((selectX == x - 3 && selectY == y)) {
|
||||||
return specialMoves.shortCastle(myPiece);
|
return specialMoves.shortCastleHighlight(myPiece);
|
||||||
}
|
}
|
||||||
// else if ((selectX == x + 4 && selectY == y)) {
|
// else if ((selectX == x + 4 && selectY == y)) {
|
||||||
// return specialMoves.longCastle(myPiece);
|
// return specialMoves.longCastle(myPiece);
|
||||||
// }
|
// }
|
||||||
}else {
|
}else {
|
||||||
if ((selectX == x - 3 && selectY == y)) {
|
if ((selectX == x - 3 && selectY == y)) {
|
||||||
return specialMoves.shortCastle(myPiece);
|
return specialMoves.shortCastleHighlight(myPiece);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue