-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
100 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pub mod explore; | ||
pub mod terminate; | ||
pub mod terminate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
use clap::{Parser, Subcommand}; | ||
use games::{reversi::cli::main as reversi_main, reversi::cli::ReversiArgs}; | ||
use games::{ | ||
chomp::cli::{main as chomp_main, ChompArgs}, | ||
domineering::cli::{main as domineering_main, DomineeringArgs}, | ||
nim::cli::{main as nim_main, NimArgs}, | ||
order_and_chaos::cli::{main as order_and_chaos_main, OrderAndChaosArgs}, | ||
reversi::cli::{main as reversi_main, ReversiArgs}, | ||
tic_tac_toe::cli::{main as tic_tac_toe_main, TicTacToeArgs}, | ||
}; | ||
|
||
#[derive(Parser)] | ||
#[command(version, about, long_about = None)] | ||
struct Cli { | ||
#[command(subcommand)] | ||
command: Commands | ||
command: Commands, | ||
} | ||
|
||
#[derive(Subcommand)] | ||
enum Commands { | ||
Reversi(ReversiArgs) | ||
Reversi(ReversiArgs), | ||
TicTacToe(TicTacToeArgs), | ||
OrderAndChaos(OrderAndChaosArgs), | ||
Nim(NimArgs), | ||
Domineering(DomineeringArgs), | ||
Chomp(ChompArgs), | ||
} | ||
|
||
fn main() { | ||
let cli = Cli::parse(); | ||
|
||
match cli.command { | ||
Commands::Reversi(args) => reversi_main(args) | ||
Commands::Reversi(args) => reversi_main(args), | ||
Commands::TicTacToe(args) => tic_tac_toe_main(args), | ||
Commands::OrderAndChaos(args) => order_and_chaos_main(args), | ||
Commands::Nim(args) => nim_main(args), | ||
Commands::Domineering(args) => domineering_main(args), | ||
Commands::Chomp(args) => chomp_main(args), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters