Run UCI by default
This commit is contained in:
@@ -13,7 +13,7 @@ use interface::uci;
|
|||||||
#[command(version, about, long_about = None)]
|
#[command(version, about, long_about = None)]
|
||||||
struct Args {
|
struct Args {
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
mode: Mode,
|
mode: Option<Mode>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(ValueEnum, Debug, Clone, Copy)]
|
#[derive(ValueEnum, Debug, Clone, Copy)]
|
||||||
@@ -26,8 +26,8 @@ fn main() {
|
|||||||
movegen::attack_generator::init_attacks();
|
movegen::attack_generator::init_attacks();
|
||||||
|
|
||||||
match Args::parse().mode {
|
match Args::parse().mode {
|
||||||
Mode::Perft => search::perft::perftree_script(),
|
Some(Mode::Perft) => search::perft::perftree_script(),
|
||||||
Mode::Uci => {
|
Some(Mode::Uci) | None => {
|
||||||
let input = io::stdin().lock();
|
let input = io::stdin().lock();
|
||||||
let output = io::stdout().lock();
|
let output = io::stdout().lock();
|
||||||
uci::uci_loop(input, output).unwrap_or_else(|e| println!("{e}"));
|
uci::uci_loop(input, output).unwrap_or_else(|e| println!("{e}"));
|
||||||
|
|||||||
Reference in New Issue
Block a user