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

@ -263,8 +263,7 @@ public class Board {
public Board(String[] fileRep) {
// 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"
// splitting on , gives 8 pieces, so width = 8.
// splitting on , gives 8 pieces, so width = 8.
this.width = fileRep[0].split(",").length;
//The number of rows is the number of lines minus the final turnline:
@ -302,8 +301,7 @@ public class Board {
// restore turn flag and clear any history/highlights
this.isTurnWhite = fileRep[height].equals("W");
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 y = 0; y < board.getHeight(); y++) {
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) {
valid=movement.movePawnSimulate(x, y)|| specialMoves.enPassant(piece, x, y, board);;