From f60c573ba71207c18a28413e3940a4e21b07c73f Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 21 Feb 2023 17:49:51 +0300 Subject: refactor: create grossmeister module --- benches/perft.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'benches/perft.rs') diff --git a/benches/perft.rs b/benches/perft.rs index 1d82ed5..ffdc940 100644 --- a/benches/perft.rs +++ b/benches/perft.rs @@ -1,12 +1,13 @@ use std::time::Instant; -use chessnost::board::Board; +use chessnost::{board::{Board, io::IO}, grossmeister::Grossmeister}; fn main() { let fen = String::from("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - "); - let mut board = Board::from_FEN(fen); + let board = Board::from_FEN(fen); + let mut gm = Grossmeister::new(board); let depth = 4; let start = Instant::now(); - let result = board.perft(depth, false); + let result = gm.perft(depth, false); println!("Perft({}) finished in {:?}: {:?}", depth, start.elapsed(), result); } -- cgit v1.2.3