Developed a command-line TicTacToe game in Java utilizing Object Oriented Programming principles and design.
This game allows for three different modes of play:
- Player πββοΈ vs Player πββοΈ
- Player πββοΈ vs Computer π₯οΈ
- Computer π₯οΈ vs Computer π₯οΈ
-
Player vs Player: Two players can take turns playing the game locally on the same machine.
-
Player vs Computer: A player can compete against a computer opponent with basic AI.
-
Computer vs Computer: Watch two AI-controlled computers play against each other.
-
Text-based Interface: The game runs entirely in the terminal with a simple text interface.
-
Game Logic: Includes winning conditions, turns, and a reset function.
-
TicTacToe.java allows for any game mode to be played on a 3 by 3 grid.
-
Upgrade.java allows the user to choose any game mode as well as any grid size from 3-20.
- Clone the repository.
git clone https://github.com/kyliegun/TicTacToe-Java.git
- Install Maven if you do not already have it.
- Windows: Download from Maven Official Website
- MacOS: Use Homebrew:
brew install maven
- Linux: Use package manager, for Ubuntu:
sudo apt-get install maven
- Build the project.
mvn package
To run the application, use the following command:
java -cp target/[YOUR_JAR_FILE].jar [MainClassWithPackageName]
Replace [YOUR_JAR_FILE] with the name of the generated JAR file and [MainClassWithPackageName] with the name of your main class.
Feel free to fork this repository and create a pull request if you make changes. Contributions are welcome and appreciated!