aboutsummaryrefslogtreecommitdiff
path: root/src/board
diff options
context:
space:
mode:
Diffstat (limited to 'src/board')
-rw-r--r--src/board/mod.rs4
1 files changed, 3 insertions, 1 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();