Nifty Assignment: Video Poker

Scott Grissom
Grand Valley State University

CCSC Midwest 2006
DePauw University
September 29, 2006

Summary

Video poker is a card game that starts each round with five cards dealt face up. The player chooses to keep 0-5 of the cards and the others are replaced on a second deal. Player attempts to form the highest paying poker hand (i.e. four of a kind, royal flush, straight, etc...). Fro example, in Figure 1 the player selects the pair of Aces and hopes to be dealt two pair, three of a kind, full house, or four of a kind.

After first deal

Select some cards

After the draw

Audience

Appropriate for the end of CS 1 or the start of CS 2.

Strengths

  • Serves as introduction to GUI and event-driven programming.
  • This is a fun and addictive game to play.
  • Excellent opportunity to explore the separation of model and view.
  • Challenging algorithms to verify each of the scoring categories.
  • Interesting design decisions.
  • Many variations available.

Design Questions

  • Who should own the cards? GUI or Game?
  • How do you minimize the game rules that must be known by the GUI?
  • Should there be one method or multiple methods responsible for checking for the various hands?

Available Resources