aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index cc087b6..6a374b7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,10 +1,9 @@
use std::{f32::INFINITY, time::{Duration, Instant}};
-use chessnost::board::{Board, Color};
+use chessnost::board::Board;
fn main() {
- let fen = String::from("5k2/p2Q4/2p5/4q3/8/2P2Pp1/PP4P1/1K3N2 w - - 1 29");
- let mut board = Board::from_FEN(fen);
+ let mut board = Board::new();
board.print();
@@ -21,7 +20,7 @@ fn main() {
board.print();
let start = Instant::now();
- let (score, pv) = board.iterative_deepening(10, Duration::from_secs(10));
+ let (score, pv) = board.iterative_deepening(10, Duration::from_secs(7));
println!("Finished in {:?}: score={:?}", start.elapsed(), score);
let mov = pv[0];
@@ -29,5 +28,8 @@ fn main() {
board.make_move(mov);
board.print();
println!("Score for {:?} is now: {}", board.color(), board.quiscence(-INFINITY, INFINITY));
+
+ // Simple pondering during opponent time
+ board.iterative_deepening(5, Duration::from_secs(3));
}
}