Object Oriented Programming and Design - Texas Hold'em | C SC 335, Exams of Computer Science

Material Type: Exam; Class: Object-Oriented Programming and Design; Subject: COMPUTER SCIENCE; University: University of Arizona; Term: Fall 2003;

Typology: Exams

Pre 2010

Uploaded on 08/31/2009

koofers-user-jlc
koofers-user-jlc 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Science 335, Fall 2003
Texas Hold'em
0) Overview
In this project you are asked to design, implement and test one of the most popular poker
games: Texas Hold'em. You may need to research this domain. Ask someone who plays
poker, or check the web, there are plenty of free poker sites. Play the game with your
teammates. The game will eventually have one human player playing from 2 to 9
computer players (or if you choose the networking option 2 to 9 human players).
Iteration #1 (36 points)
The following stories (features) should be working by the end of the first iteration. You
could have bugs, as long as they are clearly documented. Place the list of known bugs in
a file named KnownBugs.
Have a card deck that you can shuffle.
Can compare Poker hands according to the rules. Suits do NOT count. Ties can occur
with any hand (because the boardcards can be shared). Example tie: KS 5H 5C 2H 2C
and KH 5D 5S 2S 2D
Compare poker hands of size 5 cards
Complete a thorough unit test
pf3
pf4

Partial preview of the text

Download Object Oriented Programming and Design - Texas Hold'em | C SC 335 and more Exams Computer Science in PDF only on Docsity!

Computer Science 335, Fall 2003

Texas Hold'em

0) Overview In this project you are asked to design, implement and test one of the most popular poker games: Texas Hold'em. You may need to research this domain. Ask someone who plays poker, or check the web, there are plenty of free poker sites. Play the game with your teammates. The game will eventually have one human player playing from 2 to 9 computer players (or if you choose the networking option 2 to 9 human players).

Iteration #1 (36 points)

The following stories (features) should be working by the end of the first iteration. You could have bugs, as long as they are clearly documented. Place the list of known bugs in a file named KnownBugs.  Have a card deck that you can shuffle.  Can compare Poker hands according to the rules. Suits do NOT count. Ties can occur with any hand (because the boardcards can be shared). Example tie: KS 5H 5C 2H 2C and KH 5D 5S 2S 2D  Compare poker hands of size 5 cards  Complete a thorough unit test

 Have two computer player strategies  Beginner strategy randomly picks what to do. This means that if you are playing against three computer players, they are as likely to fold with three of a kind as they would be to raise with nothing in their hand.  Intermediate strategy that is more difficult to beat than the Beginner strategy over many games. This Intermediate strategy uses some intelligence to decide whether to bet, call, check, raise or fold.  Allow one human user to play one round of Texas hold-'em with 2 computer players. One player uses the Beginner strategy, and the other uses the Intermediate strategy.  The button (the little round disk that indicates who pays the small blind and gets the first card dealt) advances according to the rules (you may place the button anywhere in the first round of play).  Your game maintains the hands (all the cards) of each player and the current chip holdings (individual money amount). The pot must be accurate and the blinds are paid according to the rules.  The game must have a user interface that shows the view representing the game. (Note: In the final release, you must be able to toggle between this view and another view at any given time. So plan for this by using the Observer pattern even though there is only one observer).  View does not need images, but you may have them  View could contain text as JLabels or in a JTextArea instead showing the actual playing cards  View shows all boardcards (either none, 3, 4, or 5)  View acknowledges face down cards  Can always see the size of the pot  Can always see each players holdings  The user can easily recognize which player is currently making a play  The user can easily see and understand decisions made by each player as the betting round goes around the table; make it obvious  A timer simulates a brief pause between the computer player decisions.  Turn off the timer when the user is taking a turn so the user (you) will have all the time you need  The user can easily see who wins each round and how much (size of the pot).  You have the following menus: File New Game – Start new game. Submenu picks number of players. Quit – Exit the game (no persistence yet)

  1. Sounds (6 points maximum)  Add a substantial amount of sound to the game. Have a sound for chips tossed, cards dealt, poker commentator, notify user's turn, …
  2. Card Analysis feature (6 points maximum)  Add a feature in which the user human player can determine the possibility of getting a certain card. The player does not get this card. The player simply sees the chance of getting a desired card. An example would be if you were debating your next move, and you have a pair of jacks and there are 2 queens in the shared hand. You would like to know the chances of pulling that third jack.
  3. Make this system an Applet (6 points maximum)  Make your Poker game run in a JApplet and playable from the web.
  4. Player statistics (6 points maximum)  Add a player statistics feature that informs the user information about his opponents. At a minimum, statistics for each player must include a) percentage of rounds won, total money won or lost, and the percentage of rounds the player folded in the first through fourth betting rounds.
  5. Implement a Hint feature (4 points maximum)  When the user wants a hint, a dialog box is displayed and gives the user a hint. The hint consists of suggestions as to whether the user should call, raise, or fold. Also give the reason(s) why. We are not expecting great poker expertise. Simply state something that sounds reasonable. Examples  Fold because someone has you beat with just the cards that are showing.  Call because it is reasonable to stay in the round.  Raise because no one knows your down card combined with your up card(s) has them beat. Remember, they can not see your down card even though it is visible on the screen.  No Suggestion
  6. Add a help menu with these menu items (4 point maximum) Help (these documents may be in html format) How to play – Display rules of the game. Ranks of hands - Shows the ranks from most highest to lowest About – Information about your team. List names. A picture is cool.
  7. Splash screen (4 points maximum)  Add a splash screen at startup that has animations, sound, a cool picture, and the team names.
  8. Make the game persistent (6 points maximum) Save – Save the game state and anytime. Also prompt the user to save when quitting.