aboutsummaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-01-24 21:56:57 +0300
committereug-vs <eugene@eug-vs.xyz>2023-01-24 21:58:09 +0300
commita5fce018294f63cf153b1d9ecc1cb28e82f12c28 (patch)
tree8446b19091f78ea4056cee8ce26e79283f5bc332 /benches
parente27b950db851c91231abf3f3a3afebae18af47af (diff)
downloadchessnost-a5fce018294f63cf153b1d9ecc1cb28e82f12c28.tar.gz
refactor: abstract perft result into a structure
Diffstat (limited to 'benches')
-rw-r--r--benches/perft.rs5
1 files changed, 3 insertions, 2 deletions
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);
}