Fixed castling, added castling export to FEN
+ isFreePath implementation in Piece - Removed isFreePath from Bishop, Rook, Queen and King + canCastleKingside and canCastleQueenside methods in King + Castling rights record in Board + FEN export + equals method in Position + UCI 'position startpos' command - Switched to Java 8 compliance for compatibility reasons
This commit is contained in:
@ -7,6 +7,7 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import dev.kske.chess.board.Board;
|
||||
import dev.kske.chess.board.Move;
|
||||
import dev.kske.chess.board.Piece.Color;
|
||||
import dev.kske.chess.board.Queen;
|
||||
|
||||
@ -38,6 +39,8 @@ class BoardTest {
|
||||
assertNotSame(clone.getBoardArr(), board.getBoardArr());
|
||||
|
||||
clone.getBoardArr()[0][0] = new Queen(Color.BLACK, clone);
|
||||
clone.move(new Move(1, 1, 1, 2));
|
||||
assertNotEquals(clone.getBoardArr()[0][0], board.getBoardArr()[0][0]);
|
||||
assertNotEquals(clone.getActiveColor(), board.getActiveColor());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user