modified smth trivial

This commit is contained in:
keshi 2025-05-17 22:30:14 +02:00
parent df56940b07
commit 7509196100
2 changed files with 3 additions and 5 deletions

View File

@ -264,7 +264,6 @@ public class Board {
// Figure out how wide the board is by splitting line 0 on commas: // Figure out how wide the board is by splitting line 0 on commas:
// fileRep[0] might be something like "WR,WN,WB,WQ,WK,WB,WN,WR" // fileRep[0] might be something like "WR,WN,WB,WQ,WK,WB,WN,WR"
// splitting on , gives 8 pieces, so width = 8. // splitting on , gives 8 pieces, so width = 8.
this.width = fileRep[0].split(",").length; this.width = fileRep[0].split(",").length;
//The number of rows is the number of lines minus the final turnline: //The number of rows is the number of lines minus the final turnline:
@ -303,7 +302,6 @@ public class Board {
this.isTurnWhite = fileRep[height].equals("W"); this.isTurnWhite = fileRep[height].equals("W");
this.previousStates = new ArrayList<>(); this.previousStates = new ArrayList<>();
this.highlightedSquares= new ArrayList<>(); this.highlightedSquares= new ArrayList<>();
} }

View File

@ -13,7 +13,7 @@ public class MoveHighlighter {
for (int x = 0; x < board.getWidth(); x++) { for (int x = 0; x < board.getWidth(); x++) {
for (int y = 0; y < board.getHeight(); y++) { for (int y = 0; y < board.getHeight(); y++) {
boolean valid=false; boolean valid=false;
System.out.println("MoveHighlighter: checking (" + x + "," + y + ") for type " + type); //System.out.println("MoveHighlighter: checking (" + x + "," + y + ") for type " + type);
if(type==PieceType.Pawn) { if(type==PieceType.Pawn) {
valid=movement.movePawnSimulate(x, y)|| specialMoves.enPassant(piece, x, y, board);; valid=movement.movePawnSimulate(x, y)|| specialMoves.enPassant(piece, x, y, board);;