Enable to retreive SAN move

This commit is contained in:
Loic Guegan 2022-02-16 15:18:26 +01:00
parent 94c2565647
commit 0584edb107
5 changed files with 64 additions and 2 deletions

View file

@ -416,3 +416,15 @@ TEST_CASE("Serialize", "[board/Serialize]") {
"P ");
}
TEST_CASE("IsPieceMoveUnique", "[board/IsPieceMoveUnique]") {
Board b;
b.AddPiece('N', "a1");
b.AddPiece('n', "c1");
CHECK(b.IsPieceMoveUnique('n', "b3"));
CHECK(b.IsPieceMoveUnique('N', "b3"));
b.AddPiece('N', "d2");
CHECK(b.IsPieceMoveUnique('n', "b3"));
CHECK_FALSE(b.IsPieceMoveUnique('N', "b3"));
}