User:Mliu92/sandbox/DFD

Digging Flowers, also known as Dachen Mahjong is a tile-based game similar to mahjong and rummy in which four players compete to form their own winning hand of 21 tiles using melds of two- and three-tile sets. Like mahjong, players build their hands by both drawing from a shuffled wall and acquiring discards from other players.

History
The game is thought to have originated in Suzhou, and the pieces are sometimes known as Suzhou flower tiles (蘇州花牌) as a result. It was more popular in Jiangsu, Zhejian, and Shanghai during the late Qing Dynasty to the early Republic of China era (c. 1800–1920), where it gained the pithy saying "Dig flowers every day, but don't touch Mahjong." [天天挖小花，麻將不要搓. ]

The game is played as part of a cultural festival in Dachen Village of Hualien City, Taiwan. Dachen Village (大陳一村) was founded in the 1950s following the First Taiwan Strait Crisis.

Tiles
The tiles are similar in shape and size to mahjong tiles, but the markings are different. The majority of tiles use the same patterns as Chinese dominoes, which in turn are based on the 21 possible combinations of two six-sided dice. There are three types of tiles for each of the 21 patterns, with six tiles per pattern in total:


 * 3 "plain" (白皮) pattern tiles with no border
 * 2 "flower" (花) pattern tiles with a double border
 * 1 "double" or "stacked" (度) pattern tile with a single border and doubled pattern

Variations in markings to distinguish tile types may exist; for example, "flower" tiles may carry two additional marks rather than the doubled border, and "double" tiles may have a doubled pattern and no border.

In addition to the 126 patterned tiles (21×6), 10 additional tiles may be added: 8 bonus tiles (four seasons, four flowers) and 2 "white dragon" tiles, the same as in mahjong sets. This makes 136 tiles in total.

Dice
Two six-sided dice are used. These use the Chinese marking convention, with the one and four-pip sides marked in red.

Gameplay
One game consists of four separate hands. To start the hand, each player throws the dice and the player with the highest sum is the dealer, sitting in the position designated Heaven (天); moving anti-clockwise (to the dealer's right), the player with the next-highest roll is seated as the Earth (地), followed by the Human (人) and Harmony (和) players, in descending order of dice roll.

Each hand follows the same Heaven (6-6 pattern) - Earth (1-1) - People (4-4) - Harmony (3-1) sequence in turn. Local rules may vary; the fourth player and hand is sometimes designated Long Three (3-3 pattern, 長三) or equivalently Shirt (衫) instead of Harmony.

Setup
The four players collectively shuffle the tiles, face-down, and each builds a wall two tiles high. If only the 126 patterned tiles are used, three of the players build walls 16 tiles wide (32 tiles total), while the dealer (天) builds a wall 15 tiles wide (30 tiles total). When the "white dragon" tiles are included, each player builds a wall 16 tiles wide, and when all ten bonus tiles are included, the walls are 17 tiles wide.

The dealer throws the dice to determine which wall starts the deal, counting clockwise starting with their own wall, then throws the dice again to determine which patterns will receive the "shake" bonus for the hand. The second throw also determines which stack is used to start the draw. The dealer first takes two pairs (four tiles) from the designated wall, then players also take four tiles at a time in order, starting with Earth, until each player has 20 tiles.

Shake bonus
The "shake rule" (搖張) bonuses are applied to three distinct patterns: one for the face value of the dice, a second for the "base" value, and a third with the leftover numbers. For example, if a 1-3 is rolled, that means 4-6 and 2-5 are the other bonus patterns. 4-6 is the value on the base of the two dice, and 2-5 are left over after 1-3-4-6 are taken out.

When doubles are rolled, the "base" double and the mixture of the face and base receive the shake bonus. For example, if a 2-2 is rolled, the "base" is 5-5, and the mixture is 2-5; all three of these patterns are the designated shake bonus patterns for the hand.

As a special case, whenever the sum of the dice add to 7, the doubles of the face pips and the other combinations of 7 are the five designated bonus patterns for the hand. For example, if a 1-6 is rolled, the "base" value is 6-1 again; the five shake bonus patterns in this case are the doubled rolls (1-1 and 6-6) and all three seven-sum patterns (1-6, 2-5, and 3-4). This is called "Seven Stars". By examination, one of these three seven-sum patterns is always one of the designated shake bonus patterns.

Pattern ranks
Certain patterns are assigned ranks, which can change from hand to hand; ranks also affect scoring. Permanently designated "medium rank" (中張) patterns are the 2-2, 5-6, 3-3, and 4-6 patterns. Permanent "small rank" (小張) patterns include the sevens (1-6, 2-5, 3-4), unless one or more of those patterns are designated by the shake bonus, in which case the shake bonus is applied instead. "Large rank" (大張) patterns include all others not designated small or medium rank. Depending on the rules, the "civil" suit of patterns, as defined in Chinese domino games like Tien Gow and Pai Gow, may be placed in the "large" or "medium" ranks. These include patterns 6-6, 1-1, 4-4, 3-1, 5-5, 3-3, 2-2, 5-6, 4-6, 1-6, and 1-5.

Because each hand has a designated pattern (in sequence: 6-6, 1-1, 4-4, and 3-1 or 3-3), the designated pattern for that hand is a rotating member of the "large rank". The other patterns are designated "medium rank".

Turns
For each player's turn, play proceeds as in mahjong: the player draws a tile from the end of the wall to start their turn, and ends it by discarding a tile. Alternatively, if a player can take the discard from the preceding player (the player seated to the left), they may do so in lieu of drawing from the wall, but they still need to end their turn by discarding a tile.

Unlike mahjong, which uses three- and four-tile matching sets or sequential runs, the basic unit of Digging Flowers is a two-tile pair, which match strictly by pattern, not border. For instance, a 3-4 with a double border will match with a 3-4 without a border. However, it is advantageous to group bordered tiles together.

If the player forms a double-white pair, it cannot be broken in later turns to form a higher-valued pair using a framed tile with the same pattern. Three-tile combinations are possible only with the three framed tiles. When a player forms a three-tile set (翹), whether by drawing a tile or "eating" a discard, that set must be displayed to the other players.

Short songs are considered part of the gaming experience when making plays, as demonstrated in Pai Hsien-yung's short story "The Eternal Snow Beauty" in his 1971 collection Taipei People.

Winning and payout
When a player declares they have completed their hand by forming ten pairs and drawing (or "eating") a trump tile, the total number of points are computed for each player. The winner is the player that has the highest points, which is not necessarily the first to complete their hand.

The winner is paid according to the difference between their hand and each player's hand. The player with the second-highest points must pay the winner, but in turn is paid by the third- and last-place players.

Scoring
In general, the difficulty of achieving a combination, coupled with the pattern ranks and shake bonus determine the multiplier for the number of points awarded for specific combinations. Because the game is not widely played, specific variations of the scoring rules may be applied, often differing between regions or even families.

Two-tile combinations are scored differently according to which types of tiles are included. Actual base point values may vary by game and local rules, but generally the points double for each framed card (whether "flower" or "double") in the set. That is, the combination of two "plain" tiles earns the base value, while a {"plain" and "flower"} or {"plain" and "double"}, adding one framed card, would earn twice the base value, and a {"flower" and "flower"} or {"flower" and "double"} would earn double that, for four times the base value.

In addition, the designated shake bonus pattern(s) receive an additional 2×–4× point multiplier during that hand, depending on custom and rules.

Also, the designated hand pattern can receive the same 2×–4× point multiplier, which stacks with any other multipliers already in place. For example, during the (first) Heaven hand, the 6-6 pattern receives this multiplier. Earth (second hand) is 1-1, People (third) is 4-4, and Harmony (fourth) is 3-1.

Because there are many mental formulas for scoring, players often recite them by singing during the scoring phase.