Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.44 KB

README.md

File metadata and controls

36 lines (22 loc) · 1.44 KB

TicTacToe Java JFrame ⭕️❌

This repository contains a simple implementation of the classic TicTacToe game using Java's JFrame library. The game allows two players to play against each other on a graphical user interface.

🎮 How to Play

  1. Clone or download the repository to your local machine.
  2. Make sure you have Java Development Kit (JDK) installed.

⚙️ Compiling the Source Code

To compile the Java source code, navigate to the root directory of the project using the terminal or command prompt, and then use the javac command:

javac -d bin .\src\TicTacToe.java

📦 Building the JAR File

After compiling the source code, you can create a JAR file to distribute the game. Use the jar command as follows:

jar cf .\build\TicTacToe.jar .\bin\TicTacToe.class

▶️ Running the Game

To run the TicTacToe game, use the following command:

java -jar .\build\TicTacToe.jar

The GUI of the TicTacToe game will appear on the screen, and you can set the board size as per your preferences through the input text boxes.

🌟 Features

  • Graphical user interface using Java's JFrame.
  • Simple and intuitive design for a smooth gaming experience.
  • Two-player mode for playing against friends or family.


Feel free to explore the code and modify it as per your requirements. If you encounter any issues or have suggestions for improvement, please create an issue or submit a pull request. Enjoy playing TicTacToe!