1 use clap::{Parser, Subcommand};
2 use pluta_lesnura::{play, random_player, Game, Player};
5 #[command(author, version, about, long_about = None, arg_required_else_help = true)]
8 command: Option<Commands>,
15 /// For momentum play, draw how often? 0-1
16 #[arg(short = 'p', long, default_value_t = 0.5)]
19 #[arg(short = 'g', long, default_value_t = 1)]
22 #[arg(short = 'p', long)]
27 fn main() -> Result<(), &'static str> {
28 let cli = Cli::parse();
36 for _ in 0..*num_games {
38 std::iter::from_fn(|| Some(Player::new(random_player(*draw_chance))))
41 let mut game = Game::default();
42 for _ in 0..*num_players {
45 let result = play(game, players)?;
46 println!("Result: {result:?}");
50 None => unreachable!(),