Pinochle

 

For this portion of the assignment you are to write a Pinochle card game in Java utilizing a graphical user interface.  It is assumed that you have successfully implemented the Card, Deck, Hand, Rank, and Suit classes that are to be used with this program.

 

Pinochle is a classic two-player game developed in the United States, and it is still one of the country's most popular games. The basic game of Pinochle is Two-Hand Pinochle, which derives from the European game Bezique. It is explained first.

Number of Players. Two people can play.

The Deck and Rank of Cards. A 48-card Pinochle deck is used. It consists of: A (high), K, Q, J, 10, 9 (low) in each of the four suits, with two of each card.

The Deal. The dealer gives 12 cards to each player, non-dealer first, dealt three or four cards at a time. The next card is turned up and placed on the table; it is the trump card and every card of that suit is a trump. The remainder of the pack forms the stock and is placed face down so as to cover half of the trump card.

Object of the Game. The goal is to win tricks, so as to score the value of counting cards taken in on tricks, and to meld certain combinations of cards having values in points (see below).

The values of cards taken in on tricks are:

 

Each ace: 11

Each ten: 10

Each king: 4

Each queen: 3

Each jack: 2

Last trick: 10

Nines have no point value.

 

The values of the melds are:

Class A

A, K, Q, J, 10 of trump suit (flush, or sequence) 150

K, Q of trump (royal marriage) 40

K, Q of any other suit (marriage) 20

Dix (lowest trump; pronounced "deece") 10

Class B

[Spade Symbol]A, [Heart Symbol]A, [Diamond Symbol]A, [Clubs Symbol]A (100 aces) 100

[Spade Symbol]K, [Heart Symbol]K, [Diamond Symbol]K, [Clubs Symbol]K (80 kings) 80

[Spade Symbol]Q, [Heart Symbol]Q, [Diamond Symbol]Q, [Clubs Symbol]Q (60 queens) 60

[Spade Symbol]J, [Heart Symbol]J, [Diamond Symbol]J, [Clubs Symbol]J (40 jacks) 40

Class C

[Spade Symbol]Q, [Diamond Symbol]J (pinochle) 40

(The dix is the nine of trumps)

The Play. Each trick consists of a lead and a play. The non-dealer leads; thereafter the winner of each trick leads next. When a trump is led, it wins the trick unless the opponent plays a higher trump. When any other suit is led, the card led wins unless the opponent plays a higher card of the same suit or a trump. The leader may lead any card, and the opponent may play any card. It is not necessary to follow suit.

After each trick, each player draws a card from the top of the stock to restore his hand to 12 cards; the winner draws first.

Melding. Upon winning a trick, and before drawing from the stock, a player may meld any one of the combinations that have value, as previously described. He makes his meld by placing the cards face up on the table, where they remain until he wishes to play them, or until the stock is exhausted. Melding is subject to the following restrictions:

1) Only one meld may be made in a turn.

2) For each meld, at least one card must be taken from the hand and placed on the table.

3) A card once melded may be melded again, only in a different class, or in a higher-scoring meld of the same class.

To illustrate these rules: A player may not put down [Spade Symbol]K, [Spade Symbol]Q, [Diamond Symbol]J and score both for the marriage and for the pinochle; only one meld may be made in any turn. The player may put down [Spade Symbol]Q and [Diamond Symbol]J for 40 points; and, after winning a subsequent trick, he may add the [Spade Symbol]K and score for the marriage. A player may meld the trump K, Q for 40 points and later add A, J, 10 for 150, but may not first meld [Spade Symbol]A, K, Q, J, 10 for 150 and later score for a royal marriage, even if he adds another king or queen of spades. A player may not meld [Diamond Symbol]K, [Diamond Symbol]Q and then meld another marriage in diamonds by adding another [Diamond Symbol]K or another [Diamond Symbol]Q. He would need a different king or queen of diamonds.

Once a card has been melded and placed on the table, it may be played to a trick as though it were in the holder's hand; however, after it has been played, it may no longer be used to form a new meld.

Melding the dix. If the dealer turns a dix (pronounced "deece") as the trump card, he scores 10 points immediately. Thereafter, a player holding a dix may count it merely by showing it upon winning a trick. He may count the dix and make another meld in the same turn. The holder of the dix has the right to exchange it, upon winning a trick, for the trump card.

The Playoff. The winner of the twelfth trick may meld if possible, and then must draw the last face-down card of the stock. He shows this card to his opponent, who draws the trump card (or the dix, if the exchange has been made). The winner of the preceding trick now leads, and the rules of the play are as follows: each player must follow suit to the card led if possible, and must try to win when a trump is led (by playing a higher trump). A player who cannot follow suit must trump if he has a trump. In this manner the last 12 tricks are played, after which the players count and score the points they have won in their tricks and melds.

Scoring. The score may be kept with pencil and paper, or chips may be used. If chips are used, there may be a central pile from which each player draws enough chips to represent the number of points he scores. Alternatively, each player may be provided with chips representing 1000, from which the appropriate chips are removed as points are scored.

Melds are scored when they are made. Scores for cards taken in tricks are added after the play is complete and the cards are counted. In this count, 7 points or more count as 10. Example: 87 points count as 90. If one player scores 126 and the other 124, or if each scores 125, they count only 120 each; the other 10 points are lost.

Game. Every deal may constitute a game. The player who scores the most points wins.

Alternatively, a match can be played to 1,000 points, playing a series of deals. When one player has scored 1,000 or more, and the other player less than 1,000, the former wins the game. If at the end of the play of any hand each player has 1,000 or more, play continues for a game of 1,250, even if one player has, for example, 1,130, while the other has only 1,000. If both players go over 1,250 at the end of the hand, the play continues for a 1,500-point game, and so on. However, this seldom happens because either player has the right, during the play, to "declare himself out."

Declaring Out. At any time during the play, a player may "declare out." At that point, play stops and his tricks are counted. If, in fact, the player has 1000 points or more, he wins the game - even if the opponent has more. If the claimant has fewer than 1,000 points, he loses the game. If the game has been increased to 1,250 points, 1,500 points, or a higher score, a player may declare out at that figure.

Variation 1. After declaring out, a player must win a trick before the cards are counted; and if, in the meantime, the opponent also declares out, the first player to win a trick is the one to have his cards counted and to win or lose the game, depending on his score.

Variation 2. The same as variation 1, except that the claimant's cards are not counted until he wins a trick on a lead from his own hand.