Module shakmaty::perft [] [src]

Count legal move paths.

Examples

use shakmaty::Chess;
use shakmaty::perft::perft;

let pos = Chess::default();
assert_eq!(perft(&pos, 1), 20);
assert_eq!(perft(&pos, 2), 400);
assert_eq!(perft(&pos, 3), 8902);

Functions

debug_perft

Like perft(), but also prints the perft of each child for debugging.

perft

Counts legal move paths of a given length.