CS361

Project 8
Adding another solitaire game
due: Friday, May 2, before I leave for the day

Assignment

Add another new feature to your program: a new Poker solitaire game.

Details

  1. Add a new "Poker" menu item to the "Game" menu that, when chosen, brings up a (incredibly simple and stupid) Poker solitaire game:
    poker view
  2. The computer and user are each dealt five random cards. The computer cannot change its cards but the user can click on up to two of her cards. When a card is clicked, it is replaced with another random card from the deck.
  3. After the user has replaced up to two cards, the "Find winner" button can be clicked and a dialog will appear announcing the winner.
  4. To determine the winner, follow the standard poker 5-card rules, in which hands have the following ranking (best to worst):
    1. royal flush
    2. straight flush
    3. four of a kind
    4. full house
    5. flush
    6. straight
    7. three of a kind
    8. two pair
    9. one pair
    10. high card
  5. If the computer's hand and the user's hand both have the same ranking from these 10 rankings, you can treat it as a tie.
  6. All the menu items must work correctly for this game, except the "Shuffle" menu item.

Extra Credit

What to hand in

Hand in a hard copy of all the source code files you created or modified and also zip up all source code files and send the zip file to me as an email attachment. See the course web page on handing in assignments for further details. Also, I want you to hand back in the hard copy of Project 7 that has my red marks on it.

For fun: An Ambiguous Recommendation

"I would urge you to waste no time in making Ben an offer of employment."