Computer Science 325.001
Due Date: T
Due on your drop
Recall the rules of the
a standard 52
card. The dealer deals all of the cards to the players
, so each player
starts with 13 cards
After looking at his or her hand, each player chooses three cards and passes them face down to another player. All players mu
own cards before looking at the cards received from an opponent.
The passing rotation is: (1st hand) to the player on
your left, (2nd hand) to the player on your right, (3rd hand) to the player across the table, (4th hand) no passing. The rota
eats until the game ends.
The player holding the 2 of
lubs after the
pass plays that card to start the first trick.
Each player must follow suit if possibl e. If
a player has no cards in the suit led, a card of any other suit may be discarded. Exception: If a player has no clubs when th
trick is led, a heart or the
Queen of Spades
(the “Black Maria”)
cannot be pla
The highest card of the suit led wins a trick. The winner of the trick keeps all cards won in a single stack in front of hims
elf or herself,
face down. The winner of a trick starts the next trick.
Hearts may not be led until a heart or the
has been played (this is called "breaking" hearts). The
led at any time.
Use a score sheet with a column for each player. At the end of each hand, count the number of hearts each player has taken, a
as the Black Maria.
Hearts are 1 point each; the Black Maria is 13 points.
If one player has won all 13 hearts and the Black Maria (this is known as
“shooting the moon”
), that player can choose to subtract
26 points from his or her score, or to add 26 points to every other pl
When one player reaches or passes
, the game ends. The player with the lowest score wins.
Let’s examine an example hand…
It’s the first pass, so everyone
passes three cards to the person on their left. For this example, everyone just passes their last three
Blue has the 2 of
lubs, so Blue starts the first tri ck with that card
Orange plays the King of Clubs, Green plays the Ace of Clubs,
and Gray plays the Queen of Clubs, so Green wins the trick.
Green won the first trick, so Green starts the second trick with the King of Di amonds. Gray plays the 8 of Diamonds, Blue pla
Ace of Diamonds, and Orange plays the
Jack of Diamonds, so Blue wins the trick.
Blue won the second trick, so Blue starts the third trick with the Queen of Diamonds. Orange plays the 9 of Diamonds, Green p
the 10 of Diamonds, and Gray plays the 7 of Diamonds, so Blue again wins the trick.
Blue won the third trick, so Blue starts the fourth trick with the Jack of Spades. Orange plays the 8 of Spades, Green plays
the 10 of
Spades, and Gray plays the 4 of Spades, so Blue again wins the trick.
Blue won the fourth trick, so Blue starts the fifth trick with the 2 of Spades. Orange plays the 3 of Spades, Green plays the
Spades, and Gray plays the Ace of Hearts (since Gray has no Spades)
thus “breaking Hearts”
, so Green wins the trick.
Green won the fifth trick, so Green starts the sixth trick with the 5 of Clubs. Gray plays the Jack of Clubs, Blue plays the
8 of Cl ubs,
and Orange plays the 9 of Clubs, so Gray wins the trick.
Gray won the sixth trick, so Gray starts the seventh trick with the 10 of Clubs. Blue plays the 7 of Clubs, Orange plays the
Clubs, and Green plays the Queen of Spades, the Black Maria (since Green has no Clubs), so Gray
wins the trick.
Gray won the seventh tri ck, so Gray starts the eighth trick with the 3 of Diamonds. Blue plays the 6 of Diamonds, Orange play
5 of Diamonds, and Green plays the 2 of Diamonds, so Blue wins the trick.
Blue won the eighth trick, so Blue starts the ninth trick with the 5 of Spades. Orange pl ays the Ace of Spades, Green plays t
he 7 of
Spades, and Gray plays the Jack of Hearts (since Gray has no Spades), so Orange wins the trick.
Orange won the ninth trick, so Orange starts the tenth trick with the 6 of Hearts (since Hearts has al ready been broken). Gre
plays the 3 of Hearts, Gray plays the 5 of Hearts, and Blue plays the 2 of Hearts, so Orange
wins the trick.
Orange won the tenth trick, so Orange starts the eleventh trick with the 7 of Hearts. Green plays the 9 of Hearts, Gray plays
of Hearts, and Blue plays the 8 of Hearts, so Green wins the trick.
Green won the eleventh trick, so
Green starts the twelfth trick with the 6 of Spades. Gray plays the 6 of Clubs (since Gray has no
Spades), Blue plays the Queen of Hearts (since Blue has no Spades), and Orange pl ays the King of Spades, so Orange wins the
Orange won the
twelfth tri ck, so Orange starts the last trick of the hand wi th the 10 of Hearts. Green plays the King of Hearts,
Gray plays the 3 of Clubs, and Blue plays the 4 of Diamonds, so
reen wins the trick.
Examining each player’s won tricks at the end of the han
d reveals a score of 13 for Gray (due to the Black Maria), 0 for Blue, 6 for
Orange, and 7 for Green. On the next hand, the pass will go to the right instead of the left.
UML class diagram for the cards and their interactions if this game is implemented as a program. Include the
classes (a single playing card,
a deck of cards, a player, a dealer), and make sure that the necessary game items (a
pass, a trick
) are available as either classes or attributes, whichever fits best. Include all appropri ate attributes,
operations (with parameters, i f applicable), visibilities, mul tiplicities, associations, aggregations, compositions, and gene
as well as any UML notes that would help to clarify your model.
Remember that you
re not implementing a program, just a model of the gameplay design. Al gorithmic details will not be included in
your model, but all obvious features (data and functionality)
must be included. For instance, a card must have a rank (Ace, 2, 3,
Jack, Queen, King) and a suit (
), and functionality will be needed to determine whether two cards have the same
whether a hand of cards contains a
IBM Rational Rose
to implement your diagram, and make sure to include a header containing your
name on your diagram.
While you may
this assignment with others, you are expected to develop your
your model to other class members, and to
the models of your classmates.
Your completed homework assignment (in Microsoft Visio or IBM Rational Rose) is due on your
box by 4:30 PM on T
sday, February 12, 2013.