mirror of
https://gitlab.com/manzerbredes/chessarbiter.git
synced 2025-06-10 07:37:39 +00:00
Support for promotiongit add -A
This commit is contained in:
parent
dd4574691a
commit
3ba7bd82d2
3 changed files with 49 additions and 2 deletions
|
@ -478,4 +478,24 @@ TEST_CASE("Specific bugs found on a game", "[BugFixes]") {
|
|||
a.Setup("1k3r1r/npqbbp2/4p1p1/p2pPnNp/1P3B1P/P1PB4/5PPQ/RN2R1K1 w - - 1 19");
|
||||
a.Play("e1c1");
|
||||
CHECK(a.GetFEN() == "1k3r1r/npqbbp2/4p1p1/p2pPnNp/1P3B1P/P1PB4/5PPQ/RNR3K1 b - - 2 19");
|
||||
|
||||
// BUG 2 (Promotion)
|
||||
a.Setup("8/k2P4/2p1ppp1/5qBp/5P1P/8/6PK/8 w - - 0 45");
|
||||
a.Play("d7d8");
|
||||
CHECK(a.GetFEN() == "3Q4/k7/2p1ppp1/5qBp/5P1P/8/6PK/8 b - - 0 45");
|
||||
|
||||
// BUG 3 (Promotion)
|
||||
a.Setup("8/k2P4/2p1ppp1/5qBp/5P1P/8/6PK/8 w - - 0 45");
|
||||
a.Play("d7d8",'n');
|
||||
CHECK(a.GetFEN() == "3N4/k7/2p1ppp1/5qBp/5P1P/8/6PK/8 b - - 0 45");
|
||||
|
||||
// BUG 4 (Promotion)
|
||||
char p=a.ParseSANPromotion("d8=Q");
|
||||
CHECK(p == 'Q');
|
||||
p=a.ParseSANPromotion("d8=N+");
|
||||
CHECK(p == 'N');
|
||||
p=a.ParseSANPromotion("d8=B+");
|
||||
CHECK(p == 'B');
|
||||
p=a.ParseSANPromotion("d8=R");
|
||||
CHECK(p == 'R');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue