more things

This commit is contained in:
nora 2022-12-05 16:20:18 +01:00
parent 5b0c3106c0
commit a3b836265a
No known key found for this signature in database
4 changed files with 19 additions and 8 deletions

View file

@ -61,6 +61,8 @@ struct Args {
x: PlayerConfig,
#[arg(short)]
o: PlayerConfig,
#[arg(long)]
no_print_time: bool,
}
fn main() {
@ -72,7 +74,7 @@ fn main() {
match player {
PlayerConfig::Human => Box::new(connect4::HumanPlayer),
PlayerConfig::Perfect { depth } => {
Box::new(PerfectPlayer::new().with_max_depth(depth))
Box::new(PerfectPlayer::new(!args.no_print_time).with_max_depth(depth))
}
}
};
@ -87,7 +89,7 @@ fn main() {
match player {
PlayerConfig::Human => Box::new(tic_tac_toe::HumanPlayer),
PlayerConfig::Perfect { depth } => {
Box::new(PerfectPlayer::new().with_max_depth(depth))
Box::new(PerfectPlayer::new(!args.no_print_time).with_max_depth(depth))
}
}
};