User:Mattj2/sandbox/Arimaa rules short

Rules
Arimaa is played on an 8×8 square board. There are four trap squares which allow pieces to be captured. The two players, Gold and Silver, control sixteen pieces each:
 * One elephant (strongest)
 * One camel
 * Two horses
 * Two dogs
 * Two cats
 * Eight rabbits (weakest)

Goal
The game can be won by: There are other ways to win as well.
 * 1) Moving a rabbit to the eighth row of the board.
 * 2) Capturing all enemy rabbits.

Notation
The rows (ranks) are numbered from one to eight starting from the one closest to Gold. The columns (files) are called by the letters "a" through "h" starting from Gold's left.

Setup
The game begins with an empty board. Gold places the sixteen gold pieces in any configuration on the first and second ranks. Silver then places the sixteen silver pieces in any configuration on the seventh and eighth ranks. Figure 1 shows one possible initial placement. Gold has the advantage of moving first but Silver has the advantage of being able to react to Gold's setup.

Movement
Most pieces move one square at a time forward, backward, left, or right. Rabbits can only move forward, left, or right. Moving a piece one square is a step.

A turn consists of one to four steps. After the setup phase is completed the players alternate turns with Gold moving first.

The steps in a turn can be used on four different pieces, all on the same piece, or any combination. A step can only be made into an unoccupied square.

Strength
Some pieces are stronger than others. Stronger pieces can push, pull, and freeze weaker enemy pieces. The order of pieces from strongest to weakest is: elephant, camel, horse, dog, cat, rabbit.

Freezing
Stronger pieces can freeze weaker enemy pieces. If a piece is next to a stronger enemy piece and it is not next to any friendly pieces, the weaker piece is frozen and cannot be moved. For example, elephants can freeze camels because elephants are stronger than camels.

In Figure 3:
 * The gold horse on b6 freezes the b7 cat because horses are stronger than cats.
 * The g7 cat is not frozen because it is next to the silver rabbit.
 * The b3 elephant freezes the b2 camel, which in turn freezes the c2 dog.
 * Pieces of the same strength do not freeze each other. The g3 and h3 dogs are not frozen.

A piece's state of being frozen or unfrozen is recalculated after every step. If a player uses one or more steps to unfreeze a piece, the newly unfrozen piece may be moved on later steps of the same turn. It is legal to use one piece to unfreeze a second piece which in turn is used to unfreeze a third piece.

Friendly pieces do not freeze each other.

Pushing and Pulling
At the cost of two steps, a stronger piece may push a weaker enemy piece. First the weak piece moves one step forward, backward, left, or right into an empty square. Then the stronger piece moves into the square that was just vacated.

In Figure 4, the b6 horse can push the b7 cat:
 * 1) The b7 cat moves one step to a7, b8, or c7.
 * 2) The b6 horse moves to b7.

At the cost of two steps, a stronger piece may pull a weaker enemy piece. First the stronger piece moves one step forward, backward, left, or right into an empty square. Then the weaker piece moves into the square that was just vacated.

In Figure 4, the g5 horse can pull the g6 cat:
 * 1) The b7 horse moves one step to f5, g4, or h5.
 * 2) The g6 cat moves to g5.

In Arimaa every step must always be into an empty square. A push requires that the weak piece move to an empty square, while a pull requires that the strong piece move to an empty square. If there are no appropriate empty squares the piece in question may not be pushed or pulled.

A piece that is frozen may not push or pull another piece, but it can be pushed or pulled by another piece.
 * The b3 elephant can push or pull the b2 camel, but the camel cannot push or pull the c2 dog.

Equally strong pieces cannot push or pull each other.
 * The dogs on g2 and h2 cannot push or pull each other.

Rabbits can be pushed or pulled backwards but they cannot move backwards voluntarily. Friendly pieces cannot push or pull each other.

Other Restrictions on Pushing and Pulling
A piece may not push and pull simultaneously. That is, a player cannot use three steps to have one friendly piece move two different enemy pieces. It is perfectly legal to use two steps for one push or pull followed by another two steps for another push or pull. The same piece can push, pull, be pushed, or be pulled twice in the same turn.

Capturing
The board has four specially marked trap squares located at c3, c6, f3, and f6. If a piece is on a trap square and it is not next to any friendly pieces it is immediately captured and permanently removed from the game.

There are no exceptions to this rule.

The capture scenarios can be classified into two categories:
 * 1) A piece moves onto a trap square, no friendly pieces are adjacent to the trap square, and the piece is captured.
 * 2) One piece is on a trap square. It is only next to one other friendly piece.  The friendly piece moves away, and the piece on the trap square is captured.

Figure 5 illustrates several different ways of capturing. Case 1: A piece moves onto a trap square with no adjacent allies and is immediately captured. Case 2: One piece is on a trap square. It is only next to one other friendly piece. The friendly piece moves away, and the piece on the trap square is captured.
 * The b3 cat can step to c3. The cat is captured because it is on a trap square and no Gold pieces are at c2, c4, or d3.
 * The c8 dog can push the c7 cat onto the c6 trap square. The f3 camel can pull the f2 horse onto the f3 trap square. In both cases, the silver piece is captured.
 * The f6 cat is on a trap square and the only adjacent silver piece is the g6 rabbit. Therefore, if the g6 rabbit voluntarily steps away, the cat is immediately captured.
 * The g7 dog can push or pull the g6 rabbit, leaving the f6 cat on a trap square with no adjacent allies. If the dog pushes or pulls the rabbit, the cat is captured.

A push or pull always takes two steps. Both steps are always completed even if one of the steps results in a piece being captured.

Other ways to win
A player loses if it is their turn and they have no legal moves. In addition, a player can forfeit by resigning voluntarily or (if a clock is being used) if he or she runs out of time.

Restrictions on Repetition
A player may not pass his or her turn, and each turn must make a net change to the position. Thus one cannot, for example, take one step forward and one step backward with the same piece as their only two steps of a turn. Furthermore, one's turn may not create the same position with the same player to move as has been created twice before.