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>,
16 #[arg(short = 'g', long, default_value_t = 1)]
19 #[arg(short = 'p', long)]
24 fn main() -> Result<(), &'static str> {
25 let cli = Cli::parse();
32 for _ in 0..*num_games {
33 let players: Vec<_> = std::iter::from_fn(|| Some(Player::new(random_player)))
36 let mut game = Game::default();
37 for _ in 0..*num_players {
40 let result = play(game, players)?;
41 println!("Result: {result:?}");
45 None => unreachable!(),