A real-time multiplayer XO (Tic-Tac-Toe) game built with Python using sockets. Players connect to the server, take turns, and see the board update live in the terminal.
- Multiplayer Tic-Tac-Toe (2 players)
- Real-time updates from server
- Turn-based gameplay
- Win/Lose/Draw score tracking
- Simple terminal interface
- Python 3
- Socket Programming (TCP)
- Select (for handling multiple clients)
-
Clone the repository:
git clone https://github.com/NaphatTor/XOgame.git
-
Start the server:
python server.py
-
Open another terminal and run the client (do this twice for 2 players):
python client.py
-
Enter moves as:
row col
SocketXO/
โโโ client.py # Client-side: connects to server, sends moves, shows board
โโโ server.py # Server-side: manages game logic, turns, scores
โโโ README.md # Documentation