Moved castling right logging to Log

* Removed move counter from Piece
* Added castling right array to MoveNode and Log
* Removed castling right map from Board
* Added castling right serialization and deserialization to FENString
* Modified LogTest
This commit is contained in:
2019-10-25 11:34:07 +02:00
parent c438dd00cb
commit 4857b48e4e
7 changed files with 143 additions and 192 deletions

View File

@@ -43,10 +43,10 @@ class LogTest {
log.setActiveColor(Color.WHITE);
other.setActiveColor(Color.BLACK);
assertNotEquals(log.getActiveColor(), other.getActiveColor());
log.add(Move.fromLAN("a2a4"), null, true);
log.add(Move.fromLAN("a4a5"), null, true);
other.add(Move.fromLAN("a2a4"), null, true);
other.add(Move.fromLAN("a4a5"), null, true);
log.add(Move.fromLAN("a2a4"), new Pawn(Color.WHITE, null), null);
log.add(Move.fromLAN("a4a5"), new Pawn(Color.WHITE, null), null);
other.add(Move.fromLAN("a2a4"), new Pawn(Color.WHITE, null), null);
other.add(Move.fromLAN("a4a5"), new Pawn(Color.WHITE, null), null);
assertNotEquals(log.getRoot(), other.getRoot());
assertNotEquals(log.getRoot().getVariations(), other.getRoot().getVariations());
}