\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{palatino}
\usepackage{booktabs}
\usepackage{tabularx}
\title{A Set of Rules for Mah-Jongg}
\author{David Maze}

\begin{document}
\maketitle

\section{Basics}

\subsection{The Tiles}

The set has 144 tiles.  Except for the pretties, there are four of
each tile.  There are several groups of tiles:

\begin{itemize}
\item Three \emph{suits}; four each of one through nine of bamboo,
  circles, and characters.  (The one of bamboo typically has a
  different design, in my set a bird.)
\item Four \emph{winds}; four each of north, south, east, and west.
  (These are the only tiles with letters on them.)
\item Three \emph{dragons}; four each of red, green, and white.  (In
  my set these have no English character at all; the white dragon
  actually has an empty blue frame.)
\item Two sets of \emph{pretties}; one each of four flowers and one
  each of four seasons.
\end{itemize}

\subsection{Objective}

The goal of the game is to form a hand with four groups of three tiles
and one pair of matched tiles.  A group can be a \emph{run}
(\emph{chow}) of three consecutive tiles within a single suit (3-4-5
of circles, for example) or a \emph{set} (\emph{pung}) of three
identical tiles.  It is also possible to form a set of four
(\emph{kong}); in this case, an extra tile is drawn to make the hand
the right size.  The extra pair of tiles is called the \emph{eyes}.

When it is not your turn, you have thirteen tiles in your hand, some
possibly in face-up sets.  On your turn, you acquire a tile.  You now
have fourteen tiles; if these match the pattern described above you
can declare \emph{mah-jongg} and win the hand.  Otherwise, you will
discard a tile and the next player takes their turn.

\subsection{Setup}

Shuffle the tiles.  Form a square \emph{wall} with the tiles; it
should be two tiles high and eighteen tiles on a side, with all of the
tiles face down.  Select a player to go first; that player is
\emph{east}.  East will begin drawing tiles from their side of the
wall, starting at the right.  Roll 3d6, and separate out this number
of tiles from the end of the wall.  (Optionally, declare this number to
always be 14 instead.)  These are \emph{loose tiles}.  If
all of the tiles aside from the loose tiles are taken and nobody has
won, the hand is discarded and played again.

Starting with east and proceeding in a clockwise direction, each
player takes four tiles (two pairs off the wall).  This is repeated
twice, and then each player in turn takes a single tile.  After this
each player should have thirteen tiles, all concealed.  East takes one
additional tile from the wall now (or draws the appropriate tile when
they take their thirteenth tile: take the top tile at the end of the
wall, and also take the top tile from the third pair, skipping one).
This extra tile is the tile that would normally be drawn at the start
of east's first turn.

At this point, starting with east, each player has the opportunity to
declare pretties and concealed kongs.  If you have a flower or season,
lay it face up and draw a loose tile (from the separated set at the
end of the wall).  If you have a set of four identical tiles, you may
lay it out, then turn the middle pair of tiles over, and draw a loose
tile.

\subsection{Play}

On your turn, you acquire a tile, then discard a tile.  Normally play
begins with east drawing a tile, and proceeds in a clockwise
direction.  You can acquire a tile on your turn by drawing the next
tile from the wall.  However, you may also \emph{claim} the most
recently discarded tile, possibly out of turn.  It is conventional to
state which tile you are discarding.

You may claim a tile:

\begin{itemize}
\item If you need it to go \emph{mah-jongg}; taking this tile gives
  you four groups of tiles and a pair.  Take the tile and lay out the
  group it forms face up, then reveal your remaining tiles; you have
  won the hand!
\item If you need it for a set of four (\emph{kong}), where the first
  three tiles are in your hand (concealed).  Take the tile, lay the
  set of four all face-up, and draw a loose tile; it is now your turn.
\item If you need it for a set of three (\emph{pung}).  Take the tile
  and lay the set all face-up; it is now your turn.
\item If it would otherwise be your turn, and you need the tile for a
  sequence (\emph{chow}).  Take the tile and lay the sequence all
  face-up.
\end{itemize}

Otherwise, you cannot take a tile; you must draw.  If the tile you
draw is a pretty, lay it face up and draw a loose tile.  If the tile
you draw matches a set of three that is already laid out, you may add
the fourth tile (an \emph{exposed kong}) and draw a loose tile, though
you are not compelled to.  If the tile you draw matches a set of three
in your hand, you may lay out the set of four and turn over the outer
pair of tiles (a \emph{concealed kong}) and draw a loose tile.  It is
also possible to declare mah-jongg at this point.

Exposed sets cannot be refactored.  If you have 3-4-5 of circles
exposed and draw the 2, 6, and 7, you cannot break the exposed
sequence to form a new sequence, for example.  Tiles in your hand can
be arranged however you like, but if you go mah-jongg, your hand must
have the proscribed layout.

If you have not won and it is your turn, your turn ends by discarding
a tile, which other people may claim.

\paragraph{Robbing the kong.}  If another player has an exposed pung,
and on their turn, they draw the fourth matching tile from the wall
and use it to form an exposed kong, and if you need that tile to go
mah-jongg, you may \emph{rob the kong}, steal that tile, and win the hand.

\subsection{Simple Game}

There should be enough information so far to play a round of Mah-Jongg
with the objective of winning hands.  After each hand, the east
position shifts to the left, and that player begins the next hand.

\section{Advanced Game}

\subsection{Winds}

In the full game, there are two winds that matter.  The
\emph{prevailing wind} begins at east, and progresses to south, west,
then north; it advances when the player who was first east becomes
east again.  The game ends when the prevailing wind shifts back to
east.  The \emph{player wind} is determined by your seat at the
table.  East takes the first play, and west sits opposite him.  North
and south are the opposite of normal compass directions; pretend
you're looking up through the table.  Thus, south is to east's right,
and north is to east's left.

If east wins a hand, they continue to be east for the next hand.
Otherwise, the player who was previously north becomes east, possibly
also causing the prevailing wind to advance.  The game ends when the
prevailing wind advances from north back to east.

\subsection{Scoring}

Hands are scored after a player goes mah-jongg.  Sets of tiles are
worth some number of points.  Some sets of tiles also cause your score
to \emph{double}.  All doubles are taken, one at a time, after adding
up individual set scores.  Thus, holding a set of winds that is both
the player and prevailing wind, plus a set of dragons, this adds up to
three doubles, so your end score is multiplied by eight.

\begin{table}
\begin{tabularx}{\textwidth}{Xl}
\toprule
Exposed chow (sequence of three tiles in a suit) & 0 \\
Concealed chow & 0 \\
Exposed minor pung (set of 2-8 in a suit) & 2 \\
Concealed minor pung & 4 \\
Exposed major pung (set of 1, 9, wind, or dragon) & 4 \\
Concealed major pung & 8 \\
Exposed minor kong (set of four of 2-8) & 8 \\
Concealed minor kong & 16 \\
Exposed major kong & 16 \\
Concealed major kong & 32 \\
Pair of dragons & 2 \\
Pair of prevailing or player wind & 2 \\
Pair of prevailing and player wind & 4 \\
Pretty (flower or season, each) & 4 \\
\midrule
Pung or kong of dragons & 1 double \\
Pung or kong of prevailing wind & 1 double \\
Pung or kong of player wind & 1 double \\
Own flower and season (east = 1, south = 2, west = 3, north = 4) & 1 double \\
All four flowers & 1 double \\
All four seasons & 1 double \\
Three concealed pungs (or kongs) & 1 double \\
Two pungs (or kongs) of dragons, and a pair of the third
  (\emph{Little Three Dragons}) & 1 double \\
\bottomrule
\end{tabularx}
\caption{Scoring for all hands}
\label{table:all-scores}
\end{table}

Table \ref{table:all-scores} lists scores for all hands, even if you
don't win.  Sequences (chows) are never worth points.  Sets (pungs and
kongs) are divided into major and minor sets.  Sets of two through
eight in a suit are minor; sets of ones, nines, winds, or dragons are
major, and are worth twice as many points.  A set is also worth twice
as many points if it is in your hand (concealed) rather than laid out
(exposed).  Pairs are worth no points, unless a third tile would turn
the pair into something that doubled.  If your player wind is the same
as the prevailing wind, a set of those winds is worth two doubles.

\begin{table}
\begin{tabularx}{\textwidth}{Xl}
\toprule
Going mah-jongg & 20 \\
Winning from the wall (drawing the winning tile) & 2 \\
Fishing the eyes (last tile makes the pair) & 2 \\
Filling the only space (only can win with one tile) & 2 \\
Winning with east's first discard (standing hand) & 100 \\
\midrule
Winning as east without drawing tiles (original hand) & 3 doubles \\
Winning with a loose tile & 1 double \\
Winning with the last tile from the wall & 1 double \\
Robbing the kong & 1 double \\
No score hand (pretties are okay) & 1 double \\
All pungs or kongs & 1 double \\
All major pungs or kongs (no 2-8) & 1 double \\
Only one suit, with 1 or 9 (winds and dragons okay) & 1 double \\
Only one suit, with 1 or 9 (no winds or dragons) & 3 doubles \\
\bottomrule
\end{tabularx}
\caption{Scoring for winning hands}
\label{table:winning-scores}
\end{table}

You get additional points for going mah-jongg; these points and
doubles only apply if you win a hand.  These scores are listed in
Table \ref{table:winning-scores}.  If you won by claiming another
player's discard, you get no special points; if you win by drawing a
tile from the wall, you get two points; if you win by drawing a loose
tile (from forming a set of four or drawing a pretty), you get a
double.  A hand's score is doubled if it consists of all sets of three
or four with a pair, or if the hand is worth no points aside from
pretties from Table \ref{table:all-scores}; this generally implies a
hand of all sequences, with the pair either in a suit or from an
unfavored wind.

\subsection{Scoring example}

Imagine a winning hand that consists of the 3, 4, and 5 of circles
(exposed), three red dragons (exposed), four east winds (concealed,
but still on the table, with the middle pair face down), three twos of
bamboo (concealed), a pair of fives of characters (concealed), and the
1 of flowers and the 1 of seasons.  Further, assume the player is east
and the prevailing wind is east.  Scoring for this hand would be shown
in Table \ref{table:sample-hand-scoring}.

\begin{table}
\begin{center}
\begin{tabular}{cll}
\toprule
3C-4C-5C & Exposed chow & 0 \\
RD-RD-RD & Exposed pung of majors & 4 \\
EW-XX-XX-EW & Concealed kong of majors & 32 \\
2B-2B-2B & Concealed pung of minors & 4 \\
5K-5K & Eyes & 0 \\
1F & Pretty & 4 \\
1S & Pretty & 4 \\
& Going mah-jongg & 20 \\
& \textbf{Total points:} & 68 \\
\midrule
RD-RD-RD & Pung of dragons & double \\
EW-XX-XX-EW & Kong of player wind & double \\
EW-XX-XX-EW & Kong of prevailing wind & double \\
1F-1S & Own flower and season & double \\
& \textbf{Total hand score:} & 1088 \\
\bottomrule
\end{tabular}
\caption{Scoring the sample hand}
\label{table:sample-hand-scoring}
\end{center}
\end{table}

This scoring assumes that the player won by, say, claiming a red
dragon to form the exposed set of three.  If they won by drawing the
fourth east wind from the wall, laying out the kong, drawing a loose
tile, and then getting the 5K for the eyes, they would get 2 extra
points for fishing the eyes and filling the only space (for 72), plus
an extra double for winning from the wall, for a total score of
2304.  These are exceptionally good hands; winning hands will
frequently score around 30 points, perhaps adding one or maybe two
doubles.

\subsection{Settling}

The final phase of the hand involves the exchange of points (or
money).  First, each player gives the winning player the value of the
winning player's hand.  Then, the losing players settle with each
other; the player with the most points of the losers collects the
difference between the score of their own hand and the two remaining
players, then the losing player with the second-most points collects
the difference between his hand and the hand of the losing player with
the fewest points.

Any transaction involving east is doubled in value.  Thus, if east
wins the hand, he collects twice the value of his hand from each
player, for a total of six times the value of the hand.  Otherwise,
the winning player collects twice the value of his hand from east and
the value of the hand from the two other players, for a total of four
times the value of the hand.  Settlements involving east are similarly
doubled if east does not win the hand.

It is therefore impossible for the winning player to lose money on the
hand, even if they have fairly few points.  It is similarly possible
to make money on a good hand even without winning.  An example is
shown in Table \ref{table:settling-sample}.  In this hand, north wins
a hand and scores 64 points; west doesn't win but has 72 points; south
has 8 points, and east has no points.  Note that all scoring involving
east is doubled: south pays west the difference in their hands (56
points), but east pays south and west twice the respective
differences.  Since north won, he collects four times the value of his
hand, and pays nothing to anyone, even though west's hand is worth
more than his.


\begin{table}
\begin{center}
\begin{tabular}{lcccc}
\toprule
& \textbf{East} & \textbf{South} & \textbf{West} & \textbf{North} \\
\midrule
\textbf{Hand scores:} & 0 & 8 & 72 & 64 \\
\midrule
1. All players pay winner & -128 & -64 & -64 & +256 \\
2. Losers settle with west & -144 & -64 & +208 \\
3. East settles with south & -16 & +16 \\
\textbf{Totals:} & -288 & -112 & +144 & +256 \\
\bottomrule
\end{tabular}
\caption{Example of settling hands}
\label{table:settling-sample}
\end{center}
\end{table}

It is generally desirable to set a limit on the value of a hand.  3000
points is a typical limit; a hand worth more than 3000 is worth 3000
for purposes of settlement.  If playing for money, lower limits may be
desirable; with a 250-point limit in a penny game, east can only lose
(or win) \$15 in a single hand.  Lower limits make the game less
interesting.

\subsection{Limit Hands}

(This section can be safely ignored.)  A number of odd hands are
actually worth points, if you manage to accumulate them in your hand.
These are generally mostly concealed hands; if you collect one, you
may declare mah-jongg, and your hand scores the agreed-upon limit.

\begin{itemize}
\item Four of each dragon, plus a pair of the player's wind.  The sets
  of dragons must not be laid out, even as normal concealed kongs.
  (\emph{Imperial Mah Jongg})  Alternatively, this hand may be collected
  as three pungs of dragons (possibly exposed) plus one of each dragon
  plus a pair of the player's wind.  (\emph{Mah Jongg of the Crazy
  Monkey})
\item Four each of three winds, plus a pair of the fourth.  The sets of
  winds must not be laid out, even as normal concealed kongs.
  (\emph{Mah Jongg of the Mandarin})
\item A pung or kong of each wind, plus a pair of dragons.
  (\emph{The Fourfold Homely Happiness})
\item Within a single suit, 1-1-1-2-3-4-5-6-7-8-9-9-9, plus one more
  tile from that same suit.
  (\emph{Calling Nine Tile Hand})
\item One of each dragon and wind, plus one of the one and nine of
  each suit, plus one more tile from this set.
  (\emph{Thirteen Wonders of the Ancient World})
\item Pungs or kongs of either all three nines or all three ones, a
  pung of dragons, and a pair of the player's wind.
  (\emph{Three Adopted Sons of the Dragon})
\item Four consecutive pungs within a single suit, plus a pair of winds
  or dragons.  (\emph{Four Siamese Sisters})
\item All pungs or kongs and a pair, all of winds or dragons.
\item Seven pairs.
\item Form a kong (set of four).  Draw a loose tile, and with that,
  form a second kong.  Draw another loose tile, and go mah-jongg
  normally using that tile.
\end{itemize}

Other limit hands are known to exist; see a more canonical set of
rules.  

\end{document}
