//! Have the user compete against the [`MaxN`] algorithm in a game of dots & boxes. use ncpig::prelude::*; use ncpig_testing::dots_and_boxes::*; fn main() -> anyhow::Result<()> { env_logger::init(); let game: DotsAndBoxes<2, 8, 8> = DotsAndBoxes::new([DotsAndBoxesPlayer::Red, DotsAndBoxesPlayer::Blue]); let mut state = DotsAndBoxesState::default(); let bot = MaxN::builder().max_depth(1).build(); let user_input = UserInput::new("Your move", 1); let competition = Competition::new(&game, [&bot, &user_input], true); state = competition.play(state)?; for player in game.players() { println!("{player}: {}", game.score(player, &state)?); } Ok(()) }