Programming Assignment 2
Programming Assignment 2
Course Details
1. Introduction
Requirements
simultaneously.
Implementation
1. Server:
● Manages game state, collects player choices, determines the winner, and
2. Clients:
● Clients connect to the server, send their choices (rock, paper, or scissors),
3. Game Logic:
Rock-Paper-Scissors rules:
4. Shutdown Mechanism:
● The server shuts down automatically after one game, notifying both
3. Execution Steps
How to Run
java Server
4. Enter choices (rock, paper, or scissors) for both players when prompted.
4. Sample Outputs
Server Output
Client 1 Output (Example 1)
5. Features
● Multiplayer Gameplay: Two players connect to the server and play a game of
Rock-Paper scissors.
● Correct Game Logic: The server correctly determines the winner based on
standard rules.
6. Limitations
● The server supports only one game session. For extended gameplay, the server
would need enhancements to reset the game state after each round.
8. Conclusion
The implementation meets all requirements for PA2. The game is functional, and all
interactions between the server and clients occur as expected. The server handles