Renamed SAN-like coordinate notation to LAN, added SAN support to Board
This commit is contained in:
@ -43,10 +43,10 @@ class LogTest {
|
||||
log.setActiveColor(Color.WHITE);
|
||||
other.setActiveColor(Color.BLACK);
|
||||
assertNotEquals(log.getActiveColor(), other.getActiveColor());
|
||||
log.add(Move.fromSAN("a2a4"), null, true);
|
||||
log.add(Move.fromSAN("a4a5"), null, true);
|
||||
other.add(Move.fromSAN("a2a4"), null, true);
|
||||
other.add(Move.fromSAN("a4a5"), null, true);
|
||||
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);
|
||||
assertNotEquals(log.getRoot(), other.getRoot());
|
||||
assertNotEquals(log.getRoot().getVariations(), other.getRoot().getVariations());
|
||||
}
|
||||
|
@ -19,21 +19,21 @@ class PositionTest {
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link dev.kske.chess.board.Position#fromSAN(java.lang.String)}.
|
||||
* {@link dev.kske.chess.board.Position#fromLAN(java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
void testFromSAN() {
|
||||
for (int i = 0; i < n; i++)
|
||||
assertEquals(positions[i], Position.fromSAN(sans[i]));
|
||||
assertEquals(positions[i], Position.fromLAN(sans[i]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link dev.kske.chess.board.Position#toSAN()}.
|
||||
* Test method for {@link dev.kske.chess.board.Position#toLAN()}.
|
||||
*/
|
||||
@Test
|
||||
void testToSAN() {
|
||||
for (int i = 0; i < n; i++)
|
||||
assertEquals(sans[i], positions[i].toSAN());
|
||||
assertEquals(sans[i], positions[i].toLAN());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user