fdsnhkjfsdjkoilklhj;fvjlki;fdg

minimax-pkg
Drake 12 months ago
parent 607fc63f4f
commit f35413d395

@ -19,6 +19,7 @@ use crate::config::DEFAULT_DEPTH;
struct Options {
pub en_passant: bool,
pub depth: i64,
pub debug: bool,
}
fn main() {
@ -27,10 +28,12 @@ fn main() {
let mut options: Options = Options {
en_passant: false,
depth: DEFAULT_DEPTH.into(),
debug: false,
};
for line in io::stdin().lock().lines() {
let msg: UciMessage = parse_one(&line.unwrap());
let line = line.unwrap();
let msg: UciMessage = parse_one(&line);
match msg {
UciMessage::Uci => {
println!(
@ -65,6 +68,7 @@ fn main() {
}
_ => unimplemented!(),
},
UciMessage::Debug(debug) => options.debug = debug,
UciMessage::IsReady => {
println!("{}", UciMessage::ReadyOk)
}
@ -157,5 +161,8 @@ fn main() {
todo!("{}", msg.to_string())
}
}
if options.debug {
println!("{}\n", UciMessage::info_string(line))
}
}
}

Loading…
Cancel
Save