8-add-legal-move-filter (#16)
All checks were successful
Python tests (make) / test (push) Successful in 11s

works on #8

Reviewed-on: #16
Co-authored-by: Josh <josh@joshuaschuett.com>
Co-committed-by: Josh <josh@joshuaschuett.com>
This commit is contained in:
2025-08-19 19:56:44 +00:00
committed by Josh
parent e5a75c0737
commit 15b1a03928
4 changed files with 333 additions and 7 deletions

View File

@@ -253,7 +253,7 @@ class TestPseudoMoveGeneration(ChessLibTestBase):
def test_quiet_pawn_promotions_white(self):
cases = [
("8/PPPPPPPP/8/8/8/8/8/8 w - - 0 1", 8, "all open on 7th rank"),
("8/PPPPPPPP/8/8/8/8/8/8 w - - 0 1", 32, "all open on 7th rank"),
("8/8/7P/8/8/8/8/8 w - - 0 1", 0, "no promotions"),
("7n/7P/8/8/8/8/8/8 w - - 0 1", 0, "blocked by enemy"),
("7N/7P/8/8/8/8/8/8 w - - 0 1", 0, "blocked by friendly"),
@@ -263,8 +263,8 @@ class TestPseudoMoveGeneration(ChessLibTestBase):
def test_capture_pawn_promotions_white(self):
cases = [
("6n1/7P/8/8/8/8/8/8 w - - 0 1", 1, "one capture"),
("5n1n/6P1/8/8/8/8/8/8 w - - 0 1", 2, "two captures"),
("6n1/7P/8/8/8/8/8/8 w - - 0 1", 4, "one capture"),
("5n1n/6P1/8/8/8/8/8/8 w - - 0 1", 8, "two captures"),
("8/7P/8/8/8/8/8/8 w - - 0 1", 0, "no capture"),
]
self.run_subtests(cases, gen_white_pawn_capture_promotions)