Distributed Tic-Tac-Toe Game

🔗View on GitHub

Multiplayer Tic-Tac-Toe using Java Sockets and multithreading for real-time play across nodes.

🔗 Distributed Systems

Overview

Developed an online multiplayer Tic-Tac-Toe game with AI opponent and two-node remote play. Implemented using Java Sockets and SSH tunneling for distributed communication, with multithreading to improve synchronization reliability by 70%.

System Architecture

Client-Server Architecture: Two players connect to a central game server via TCP sockets. Each client sends moves as serialized objects through buffered streams. The server validates moves, maintains game state in a synchronized 2D array, and broadcasts updates to both clients. SSH tunneling secures inter-node communication. AI opponent uses Minimax algorithm evaluated on a separate thread for non-blocking gameplay.

Setup & Implementation

Client-server architecture using TCP sockets for move exchange. Each player runs on separate nodes connected via SSH. Game state synchronized using synchronized threads and buffered streams. AI opponent implemented with Minimax algorithm for optimal move prediction.

Technologies Used

JavaSocketsSSHMultithreadingAI

Explore More Projects

View All Projects →