Setup

Epaminondas is played on a 14x12 board. The two rows closest to each
player are filled with pieces of his color.

The board size can be customized in the "challenge" command by using the
size option. The syntax is "--size=[rows]x[cols]". For example, the
game can also be played on an 8x8 checkboard with this command:

epaminondas challenge -size=8x8 player1 player2

Movement

The basic unit of movement in Epaminondas is the phalanx. A phalanx is
an unbroken line of pieces of the same color in any direction (horizontal,
vertical, or diagonal). In the following diagram, the large X in the middle
is a part of a 4-piece phalanx vertically, 3-piece plalanxes on both diagonals,
and form a phalanx of 1 piece horizontally.

. . x . .
. . x x .
x . X . .
. x x x .
. . . . x

A phalanx may move forward or backward along it length. It may NOT move
sideways at all. It may move only as far as its own length, so a phalanx
of 3-pieces may move 1, 2, or 3 spaces. It is not necessary to keep
existing phalanxes together; a smaller phalanx may break off of a larger
one, as long as it does not move more spaces than the number of pieces moved.
An isolated piece forms a phalanx of 1, and may move 1 space in any direction.

Capturing

When a phalanx encounters an enemy piece when moving, it may be able to
capture one or more enemy pieces. The enemy pieces along the same line
as the attacking phalanx will form a phalanx of 1 or more enemy pieces.
In order to be able to capture, the attacking phalanx must be longer than
the enemy phalanx. If the enemy phalanx is equal in length or longer than
the attacking phalanx, it is safe and may not be captured.

When a capture is possible, the leading piece of the attacking phalanx
stops on the space occupied by the first enemy piece encountered.
That enemy and all other enemy pieces in the defending phalanx are removed
from the board. The following diagram illustrate possible captures,
and non-captures, by the phalanx of 3 eks.

Object

The object of the game is to get a piece to the opposite side of the
board. But there is an additional complication: after reaching the
opposite side of the board, your opponent has one move to counter your
threat. There are two ways to do this:

He may capture the piece.

He may move one of his own pieces to your side of the board.

The implications of this is that, at the start of your turn,
you have more pieces on the opposite side of the board than
your opponent has on your side of the board, you win.

Eks moves A5,C5-D5 which captures both of Ohs pieces, and threatens to
win, because he now has more pieces on the opposite side of the board
than eks! Ohs has no move to counter the threat, so Eks will win
after the next move by Ohs.

Move Notation

As shown in the preceeding section, the moves sent to the server
are notated by giving both end points of the phalanx being moved,
followed by the space one end of the phalanx moves to.
If a single piece is being moved, simply give the source and destination
spaces.