- A Cli Tic Tac Toe game
- Jdk 8
- Maven
mvn clean compile assembly:single
- The game can be run with or without initial arguments
java -cp target/tictactoe-1.0-jar-with-dependencies.jar com.abhisheksoni.tictactoe.Runner
java -cp target/tictactoe-1.0-jar-with-dependencies.jar com.abhisheksoni.tictactoe.Runner StartGame 2 u1 x u2 0 3
- An alternate to the above, the convenience script
start.sh
orstart.bat
can be run - This script would build and run the game
sh start.sh
StartGame <Number of players> <User ids and symbol for each player separated by space> <Board size>
- Example: StartGame 2 u1 x u2 0 3
- The symbol 'c' is reserved for a bot, if 'c' is supplied as a symbol for a player, it becomes a bot.
Action | Command |
---|---|
Play Move | <row> <column> |
Undo | u |
Reset | r |
New Game | n |
Exit Game | e |