modified smth trivial
This commit is contained in:
parent
df56940b07
commit
7509196100
|
|
@ -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 turn‐line:
|
||||
|
|
@ -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<>();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);;
|
||||
|
|
|
|||
Loading…
Reference in New Issue