From a5fce018294f63cf153b1d9ecc1cb28e82f12c28 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 24 Jan 2023 21:56:57 +0300 Subject: refactor: abstract perft result into a structure --- benches/perft.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benches') diff --git a/benches/perft.rs b/benches/perft.rs index c73208f..1d82ed5 100644 --- a/benches/perft.rs +++ b/benches/perft.rs @@ -5,7 +5,8 @@ fn main() { let fen = String::from("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - "); let mut board = Board::from_FEN(fen); + let depth = 4; let start = Instant::now(); - let result = board.perft(5, false); - println!("Perft finished in {:?}: {:?}", start.elapsed(), result); + let result = board.perft(depth, false); + println!("Perft({}) finished in {:?}: {:?}", depth, start.elapsed(), result); } -- cgit v1.2.3