summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-27 11:13:49 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-27 11:13:49 +0100
commitf9ac11ad44b00f7e29ef2a9159c65f146f739835 (patch)
tree3238b66903e4919584620d36377474abe72d1e3e /tests
parent5fdfda00a90063d6ba6b4b07c6043efa3fb6de84 (diff)
Debug SANParser
Diffstat (limited to 'tests')
-rw-r--r--tests/chessarbiter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/chessarbiter.cpp b/tests/chessarbiter.cpp
index 2b6bdec..a2b3fc0 100644
--- a/tests/chessarbiter.cpp
+++ b/tests/chessarbiter.cpp
@@ -502,4 +502,10 @@ TEST_CASE("Specific bugs found on a game", "[BugFixes]") {
CHECK(p == 'R');
p=a.ParseSANPromotion("c1=R");
CHECK(p == 'R');
+
+ // Bug 5 (Pin piece: the Knight on c3 cannot move so the only legal move for a white Knight is g1e2)
+ a.Setup("r1bqk2r/pp1n1p2/3p4/1BpP2pp/1b2n2P/2N1P1B1/PP3PP1/R2QK1NR w KQkq - 3 12");
+ CHECK(a.ParseSAN("Ne2") == "g1e2");
+ a.Play("g1e2");
+ CHECK(a.GetFEN() == "r1bqk2r/pp1n1p2/3p4/1BpP2pp/1b2n2P/2N1P1B1/PP2NPP1/R2QK2R b KQkq - 4 12");
} \ No newline at end of file