1
0
Fork 0

add details about the maximum number of moves

This commit is contained in:
Paul-Nicolas Madelaine 2025-11-17 22:07:05 +01:00
parent 7d7884326c
commit 36535f292a
3 changed files with 21 additions and 7 deletions

View file

@ -318,3 +318,14 @@ fn san() {
Err(InvalidSan::Ambiguous),
);
}
#[test]
fn max_legal_moves() {
let position = Setup::from_text_record("R6R/3Q4/1Q4Q1/4Q3/2Q4Q/Q4Q2/pp1Q4/kBNN1KB1 w - -")
.unwrap()
.into_position()
.unwrap();
assert_eq!(position.count_legal_moves(), 218);
assert_eq!(position.legal_moves().len(), 218);
assert_eq!(position.perft(2), 99);
}