Part 1 - Requirement Spec for 5 Card Draw Poker assignment, making usage of Java Sockets PDF

Title Part 1 - Requirement Spec for 5 Card Draw Poker assignment, making usage of Java Sockets
Author Stephen Lynam
Course OO Analysis and Design
Institution Dublin City University
Pages 5
File Size 81.6 KB
File Type PDF
Total Downloads 11
Total Views 119

Summary

Requirement Spec for 5 Card Draw Poker assignment, making usage of Java Sockets and internet connectivity to play a game of 5 card draw....


Description

Requirement Specification The Five-Card draw poker game will be a client-server based poker game, with the aim to give a basic platform for users to play one another. We intend to use the Internet and java socket implementation to allow us to achieve this. Goals: ● Enable users to play real-time Five-Card draw poker against their friends. ● Have an easy to navigate user interface. ● Allow each player is to be allocated a static chip balance upon starting the game. ● Possibly having the ability to play versus a computer player.

The project is designed to be used by 2 players via a server. Users: ● Player: The player user-type is a name used for clients who connect to the server to play the game. The player should encapsulate their username and hand, along with their remaining chip balance. No user information is saved, therefore if the game is restarted the user will begin from default.

The project assumes the user has a basic understanding of how to use the command line and java compilers, along with the software required to run the program (Java platform/Compiler)

Informal Scenarios Loading the program: Kevin compiles the program and loads from the command line/Double clicks the application icon on his desktop. The GUI loads and Kevin enters his username. Dealing a hand: Kevin decides to play a game. He clicks the deal button/He gives the deal command. His hand is dealt. Full table: Kevin attempts to join the game but Alex and Bob are currently playing. The current table is full since the game supports up to 2 players at one time. Kevin receives an error telling him this and he tries again when a player quits. Poker Table: Alex and Bob join the table. Cards are randomly dealt to the players, five cards face down each.

Cian is randomly chosen to make the first action. Placing a bet: Alex begins with 2 pair jacks of hearts and clubs, 2 of hearts, 3 of spades and 5 of diamonds. Liking the look of his hand, he enters an initial bet of 75$ into the console. His 75$ is added to the pot. Winning a hand: Bob calls Alex’s final bet of 90$, Alex overturns his hand revealing a straight to the Ace, knowing he is beaten, Bob folds his hand allowing Alex to win the hand, adding the pot to his current balance. Discarding cards: Alex has a hand of three 7s, a 4 of hearts and a Jack of spades. Hoping to get another 7, Alex discards his 4 and Jack (Up to a maximum of 3 cards) and draws 2 more. He gets another 7 and a King of diamonds, making a “4 of a Kind” hand. Split Pot: Both Anne and Cian both make an All-In bet of 50$ on a pot of 770$, Both players reveal a hand of 10, Jack, Queen, King, Ace, Clubs and Hearts respectively. Since both players have the exact same hand, the pot is then split with both players taking winnings of 385$ + their bet. Balance not high enough: Annie and Cian are both playing a hand, Annie attempts to add 80$ to the pot while her current balance is only 65$, since she has insufficient funds, the game returns an error telling her to try a lower amount. Exiting the game: Annie, having exhausted Cian’s balance, wishes to leave the game. She types “exit” and the program closes.

Primary Class List 1.

2.

Name : PokerGame Attributes: Deck Hand Table Methods: main(); Name : Table Attributes:

Pot NumOfPlayers

Methods: 3.

Name : Person Attributes:

Methods:

4.

UserName Balance CurrentBet getHand(); checkBalance(); placeBet();

Name : Hand Attributes: Methods:

5.

Ante deal();

Cards checkHand(); replaceCard(); discardCard();

Name : Deck Attributes: Methods:

CardsUsed Cards shuffle(); deal(); discard(); replace();

6.

7.

Name : Card Attributes: Value Methods: getSuit(); Name : Suit Attributes:

Clubs Diamonds Hearts Spades Methods: toString();

Class Diagrams

Use Case Diagrams...


Similar Free PDFs