mirror of
https://github.com/Noratrieb/minmax.git
synced 2026-01-16 08:15:04 +01:00
more things
This commit is contained in:
parent
5b0c3106c0
commit
a3b836265a
4 changed files with 19 additions and 8 deletions
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue