diff options
Diffstat (limited to 'cli/src/main.rs')
| -rw-r--r-- | cli/src/main.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs index f7fcddf..57991f0 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,6 +1,7 @@ use ai::CheckersBitBoard; use clap::{App, Arg, SubCommand}; +mod eval; mod perft; fn main() { @@ -19,6 +20,17 @@ fn main() { .help("The depth to go to"), ), ) + .subcommand( + SubCommand::with_name("eval") + .about("Calculate the advantage") + .arg( + Arg::with_name("depth") + .required(true) + .short("d") + .takes_value(true) + .help("The depth to go to"), + ), + ) .get_matches(); if let Some(matches) = matches.subcommand_matches("perft") { @@ -34,4 +46,8 @@ fn main() { ) ); } + + if let Some(_matches) = matches.subcommand_matches("eval") { + println!("{}", eval::eval()); + } } |
