A secure two-player Tic-Tac-Toe game using Python socket programming, SSL encryption, and Tkinter GUI. This project was developed as a group mini-project as part of the Computer Networks course, demonstrating real-time multiplayer communication over a secure TLS-encrypted client-server architecture.
To build a client-server Tic-Tac-Toe game that:
- Supports two-player encrypted communication using SSL
- Offers a GUI interface for players using Tkinter
- Uses socket, threading, and secure communication principles
- Python 3
- Sockets & Threading
- SSL/TLS (with
ssl
module) - Tkinter (GUI)
- X.509 certificate (
.crt
and.key
)
- Accepts two clients over TLS
- Assigns player marks:
'X'
and'O'
- Handles game logic, player turns, and broadcasts updates
- Detects win/draw and notifies both clients
- Connects to the server securely via SSL
- GUI-based 3x3 grid using Tkinter
- Sends player moves, receives updates
- Displays results via pop-up dialogs
- TLS/SSL-based communication (using
ssl.SSLContext
) - Encrypted data between client and server
- Certificate and private key files are used for authentication
openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
You can also use the provided server.crt and server.key.
python server.py
python client.py
Ensure that the IP in client.py and server.py match your local/host machine IP (e.g., 192.168.x.x
).
⭐ If you found this project useful or interesting, please consider giving it a ⭐ star!