Reference no: EM133042946
Question: You can opt to make an alternate game of equivalent difficulty, but it must use threads, a client server model with a lobby and support more than two people per game. All alternate games must be signed off on by the instructor.
Yahtzee!! Create client and server applications to play the game of Yahtzee. The server must be able to support 5 or more simultaneous connections from clients. Minimum requirements:
- Clients should have a place to enter a server ip address as well as the username they would like to use when playing.
- If more clients try to connect then the 5 allowed they should receive a message that the server is full. If a client tries to reconnect later, they should be allowed in.
- When a client gets connected:
o The client should get a list of any currently connected clients along with which game they are currently in (if any). This list should be periodically updated as people select a new game to participate in.
o They should also get a listing of games that are waiting for players join. Each listed game should also show how many players are currently in the game.
o There is a varying number of clients that can participate in a Yahtzee game, so
A player should have the ability to join any game that has not started. If they do so, the system should then inform them they must wait until the game has started. If a player chooses to join a game that already has five players they should receive a message that the game is full.
A player should also have the ability to host a new game. This option should let them choose a name for the game. If they choose this option, they should be presented with a button to start the game when they feel enough players have joined.
Since the server allows a maximum of 5 connections, you can assume that no more than 5 games will be being played at any one time.
- All clients should be able to view what dice are being rolled, who's turn it is, what roll they are on, which round this is, and the current total score of all players.
- All clients should be able to choose which category (Aces, Full House, etc.) they have entered a score for.
- All major game decisions should be performed or verified by the server. For example:
o if a client chooses to roll the dice a request should be sent to the server to roll and the server should return new random values to the client (and others as appropriate).
o If a client would like to score a roll (for example, as a full house), the dice results should be sent to the server to verify that the user doesn't already have a combination saved for the full house. The server should then score the roll and return an updated score sheet to the user.
- The server should display a list of connected users and games. The listed game names should include how many people are in each game. These listings should be updated as users connect/disconnect and games start/end
- When choosing which game to connect to a client should be able to chat with all players connected to the server and not in a game. Once connected, a client should be able to chat with players in their game. The server should display a log of all chat messages as well as client connections / disconnections and games starting and finishing. The log may be limited to the 100 most recent messages if you like.
- If a user disconnects in the middle of a game, that game should continue. The disconnecting user should just be removed from participation. If all users leave, the game should end and be removed from the list on the server/clients.
- When the server is shutdown all working threads on the server and, as necessary, the clients should end. The clients should be reset to connect to a new game.
Attachment:- Client server model.rar