jlheard / tonk-engine

API for playing the card game called Tonk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tonk Engine 0.1

Collaborators

Jason Heard

License

ISC see LICENSE.md for more detail

Project Summary

This an attempt at creating an API for playing the card game Tonk with various front ends.

Versions

  • 0.1 - Going to add the basic groundwork of establishing a game.

Rules

These rules come from: http://www.pagat.com/rummy/tonk.html

This page was written by John McLeod and is based on various sources, including articles posted in rec.games.playing-cards, and information on variations from many correspondents.

Introduction

Tonk, also known as Tunk is a kind of knock rummy played in the USA. It was a favourite with jazz players in the 1930's and 1940's, as attested by at least two members of Duke Ellington's orchestra (see references), and may have given its name to one of Billy Strayhorn's piano compositions, written in 1940. The Duke recorded Tonk, with Strayhorn, in 1946. Some say that it originated in the Philippines, which is plausible since the related 12-card game Tong-Its is currently played there.

Tonk has since become more widespread, and there are numerous variations. Nevertheless, many players seem certain that their own way of playing is the only correct one. Before starting a game with unfamiliar players, it is wise first to agree what house rules are in force. I have tried to give a typical version of the game first, followed by a selection of the alternative rules that may be encountered.

Players, Cards and Stakes

In theory any number can play, but it is widely agreed that Tonk is best for two or three players, maybe four. Since there is some scope for hustling collusion when more than two people play, some prefer to play with two players only.

A standard 52 card deck is used, without jokers. The cards have values as follows: picture cards count 10 points, aces count 1 point and other cards count face value.

Tonk is usually played for money. Before beginning, the players should agree on the basic stake (the amount which the winner of each hand will normally be paid by each of the other players). In certain cases the winner can win a double stake - this is generally known as a tonk.

The cards are cut to decide who should deal first. The highest card deals; if there are more than two players the player who cut the next highest card sits to the dealer's left, and so on around. If a new player joins a game that is underway, the new player sits to the dealer's right.

The Deal

Five cards are dealt to each player, clockwise, one at a time. The next card is placed face up on the table to start the discard pile, and the remaining undealt cards are placed face down in a stack beside the discard pile to form the stock.

Any player whose initial hand contains 49 or 50 points must declare this immediately and show their cards: this is sometimes known as a "tonk". In this case the hand is not played and the player with 49 or 50 is paid twice the basic stake by each of the other players. If more than one player has 49 or 50, the hand is a draw - there are no payments, the cards are thrown in and the next player deals.

The Play

If no one claims an immediate win based on the points in their hand the play begins. The aim is, by drawing and discarding, to form your cards into spreads, which can be books of 3 or 4 equal ranked cards or runs of 3 or more cards in suit, or to dispose of your cards by adding them to existing spreads. You win if you manage to get rid of all of your cards, or if you have the lowest value of unmatched cards when someone stops the play. Note that once the play has begun, it is no longer any use to collect 49 or more points; this only wins in your original hand, before the play starts.

The person to the left of the dealer plays first and the turn to play passes clockwise. At your turn, you have two options.

  • If you wish, you can end the play at the start of your turn by placing all your cards face up on the table. This is called dropping (or going out low, or sometimes knocking). By doing this you are claiming to have a lower point count total in your hand than any other player.
  • If you choose not to drop, you must either draw ("pluck") the top card from the face down stock, or take the top card of the discard pile into your hand. You may then be able to reduce your hand by putting a spread face up on the table, or by adding to a spread already on the table. You end your turn by discarding a card face up on top of the discard pile. During the game only the top card of the discard pile should be visible. Players are not allowed to look through the pile to find out what cards were discarded earlier.

If after drawing from the stock or discard pile you have a spread of three or more cards, you may place them face up on the table. These cards then no longer count towards the total in your hand. There are two types of spread:

  • A book consists of three or four cards of the same rank, such as spadeQ-heartQ-diamondQ or heart4-club4-diamond4-spade4.
  • A run consists of three or more consecutive cards of the same suit, such as spadeA-spade2-spade3 or heart8-heart9-heart10-heartJ. The ace counts as low, next to the two not the king. Another possibility to reduce the cards in your hand is to extend a spread previously put down by yourself or another player. Putting down a card to extend a spread is sometimes called hitting. For example if there is club5-club6-club7 on the table and you have club4 or club8 in your hand you can put it on the table, adding it to the run. Cards can only be put down like this in your own turn, after drawing and before discarding.

If by putting down cards, you get rid of all the cards in your hand (by making a second spread or using all your cards to hit existing spreads), the play ends and you win the hand (see below). Otherwise, you complete your turn by discarding one card face up on top of the discard pile. If this leaves you with no cards you win; otherwise the turn passes to the next player to your left and play continues.

If no one ends the play by dropping (going out low) or playing all their cards, eventually the stock runs out. After a player draws the last card of the stock, play can continue so long as each player is prepared to take the previous player's discard. However, as soon as a player wishes to draw a card from the stock when it is empty, the play ends.

End of the play - payments

Assuming that no one claims 49 or 50 points immediately after the deal, the play can end in four ways.

Someone gets rid of all their cards without a final discard

This may happen as a result of a player putting down a second spread or hitting existing spreads on three occasions. This is usually called a tonk, or the player is said to "tonk out". The winner is paid a double stake by each other player.

Someone runs out of cards by discarding their last card

The player with no cards wins and each of the other players pays the agreed basic stake to the winner.

Someone drops or goes down or knocks at the start of their turn.

In this case everyone exposes the cards that remain in their hands and adds up the values of the cards they held.

  • If the player who dropped has the lowest point count, that player wins and is paid the basic stake by each of the other players.
  • If the player who dropped does not have the lowest count, the player who dropped must pay twice the basic stake to everyone who has an equal or lower count. In addition, the player (other than the one who dropped) who actually had the lowest count receives the basic stake from everyone else. In the case of a tie for lowest between two players other than the one who dropped, both are paid. This is sometimes known as a catch.

The stock runs out.

The player with the lowest count receives the basic stake from each other player.

...

References:

  • In Penniless Blues (New York, Putnam, 1955) Mel Heimer wrote: "Will used to be the best tonk player - that's a card game that's real popular with the Negro musicians - in Duke Ellington's band".
  • Trumpet player Rex Stewart (1907-1967), who joined Duke Ellington's orchestra in 1934, remembered in his Jazz Masters of the Thirties (Da Capo Press, 1972): "Ellington's group was no exception, and we played lots of tonk (a fast form of gin rummy)."

About

API for playing the card game called Tonk

License:ISC License


Languages

Language:Groovy 64.4%Language:CSS 34.3%Language:JavaScript 1.3%