A simple graphical Tic-Tac-Toe game implemented in Java using Swing for the user interface and sockets for multiplayer functionality.
This project is a multiplayer Tic-Tac-Toe game with a graphical user interface (GUI) built using Java Swing. Players can connect over a network and enjoy a game of Tic-Tac-Toe.
- Graphical User Interface (GUI): Enjoy the game with a visually appealing Swing-based interface.
- Multiplayer: Play against a friend over a network.
- Java Sockets: Utilizes Java sockets for network communication.
Before you begin, ensure you have met the following requirements:
- Java Development Kit (JDK) installed on your machine.
-
Clone the repository.
-
Compile the Java files:
cd src && javac com/soe/tictactoe/*.java
-
Run the server:
java com.soe.tictactoe.GameServer
-
Run two instances of the client for Player 1 and Player 2, each by the command:
java com.soe.tictactoe.GameClient
- The game follows the standard Tic-Tac-Toe rules.
- Players take turns to make a move by clicking on the desired cell in the GUI.
- The game announces the winner or declares a draw when the game is over.
Contributions are welcome! Please fork the repository and create a pull request with your improvements.
This project is licensed under the MIT License - see the LICENSE file for details.