diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-10 17:07:27 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-10 17:07:27 +0100 |
| commit | db78ff212da7abed937b03b120b1cf1afba2f37f (patch) | |
| tree | d90dc37e7c391d001f92f05284a0cdf101560552 /tests | |
| parent | 779cf4f082343da894da89635127ae7bda22c657 (diff) | |
Add plus sign to SAN moves when player is in check
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/chessarbiter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/chessarbiter.cpp b/tests/chessarbiter.cpp index a6ee016..931b545 100644 --- a/tests/chessarbiter.cpp +++ b/tests/chessarbiter.cpp @@ -513,4 +513,15 @@ TEST_CASE("Specific bugs found on a game", "[BugFixes]") { CHECK(a.ParseSAN("Ne2") == "g1e2"); a.Play("g1e2"); CHECK(a.GetFEN() == "r1bqk2r/pp1n1p2/3p4/1BpP2pp/1b2n2P/2N1P1B1/PP2NPP1/R2QK2R b KQkq - 4 12"); + + // Bug 6 SAN move that lead to check must have a + sign on the SAN moves + a.Setup("rnb1kbnr/pppp1ppp/3qP3/8/8/8/PPP1PPPP/RNB1KBNR b KQkq - 0 4"); + a.Play("d6d1"); + CHECK(a.IsCheck(false)); + CHECK(!a.IsCheck(!false)); + CHECK(a.GetSAN()=="Qd1+"); + a.Setup("rnb1kbnr/pppp1ppp/3qP3/8/8/8/PPP1PPPP/RNB1KBNR b KQkq - 0 4"); + a.Play("d6d3"); + CHECK(!a.IsCheck(false)); + CHECK(a.GetSAN()=="Qd3"); }
\ No newline at end of file |
