This project is a multithreaded server-client application built in Java for the Rock-Paper-Scissors game. The server is responsible for accepting multiple client connections, handling communication between them, and managing the game state. The client can interact with the server to play the game.
Note
This project is a school assignment.
- 🪨 Rock crushes ✂️ Scissors
- ✂️ Scissors cuts 📄 Paper
- 📄 Paper covers 🪨 Rock
The Rock-Paper-Scissors game server provides a platform where multiple users can play the game against each other. It features:
- Client-server communication over TCP sockets.
- Multithreaded handling of multiple users.
- Logging of server and client activities.
- Proper management of client connections.
- Multithreaded server: Each client is handled in a separate thread, allowing multiple concurrent connections.
- Game logic: The server contains the rules for the game and determines the winner.
- Logging: Server and client activity are logged for debugging and monitoring purposes.
- Client Interaction: Clients can send messages to the server and receive responses to play the game.
- Connection Management: The server monitors and handles new client connections.
- Java: The core language for server and client implementation.
- TCP/IP: For communication between server and client.
- Multithreading: To handle multiple clients simultaneously.
- Logging: For monitoring and debugging server activity.
Here are some projects that were helpful in creating this project:
-
Multithreaded Server-Client Java
A basic multithreaded server-client structure that helped with the server-client communication setup. -
Server Messaging
Provided insights into messaging protocols for client-server interactions. -
Chess Game Server
A server-side game logic for managing a chess game, which inspired some of the structure for game state management. -
Tic-Tac-Toe Server
Helped with managing game logic and networking protocols for client-server communication.
The following tutorials and resources helped me understand the key concepts needed to implement the server-client communication:
-
How to Create a Simple TCP Client-Server Connection in Java - GeeksforGeeks
-
Establishing Two-Way Communication Between Server and Client in Java - GeeksforGeeks
-
DigitalOcean Tutorial on Java Socket Programming - DigitalOcean
This project is licensed under the MIT License - see the LICENSE file for details.