aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/board/mod.rs4
-rw-r--r--src/main.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/board/mod.rs b/src/board/mod.rs
index 6df55ab..8f5fbde 100644
--- a/src/board/mod.rs
+++ b/src/board/mod.rs
@@ -1,4 +1,4 @@
-use std::io::stdin;
+use std::io::{stdin, stdout, Write};
use rand::{rngs::StdRng,SeedableRng,Rng};
use crate::{bitboard::{Bitboard, serialize_bitboard, bitscan, pop_count}, moves::{Move, MoveKind}, attacks::Attacks, square::Square};
@@ -148,6 +148,8 @@ impl Board {
}
pub fn read_move(&self) -> Result<Move, String> {
+ print!("\nEnter a move: ");
+ stdout().flush().unwrap();
let mut s = String::new();
stdin().read_line(&mut s).unwrap();
let chars = &mut s.chars();
diff --git a/src/main.rs b/src/main.rs
index 7931c63..61f2cd3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,7 +28,7 @@ fn main() {
board.print();
println!("Score for {:?} is now: {}", board.color(), board.quiscence(-INFINITY, INFINITY));
- // Simple pondering during opponent time
+ println!("\nPondering for 3 seconds...");
board.iterative_deepening(5, Duration::from_secs(3));
}
}