Help:Hex

This is the documentation for the MediaWiki plug-in for drawing Hex diagrams.

Each diagram consists of the board settings and the pieces that are placed on the board. All this is enclosed in &lt;hex&gt;...&lt;/hex&gt; tags.

= Syntax =

The description of a Hex diagram consists of a series of words. The first letter of each word is called the command, and the remaining letters are its arguments. There are commands for specifying the board size and for putting stones on the board.

= Setting up the board =

R number
Specifies the number of rows of the board.

C number
Specifies the number of columns of the board.

Q number
Specifies whether the coordinates should be printed next to the board. Zero means no, any other number means yes.

= Setting up the stones =

The commands for setting up stones all take a coordinate as their argument. Coordinates are written in the form f7, where f is the column and 7 is the row.

The commands are:
 * B for a blue stone.
 * R for a red stone.
 * H for a horizontal stone (equivalent to B).
 * V for a vertical stone (equivalent to R).
 * S or * for a star.
 * P or + for a plus.

When you want to add move numbers, put a single digit (0-9) between the command and the coordinate, for example R5e4 when Red puts his fifth move onto e4.

= Automatically numbered moves =

There is a special command (M) for setting up numbered sequences of moves. The first of these moves is for Red. After each M command, the color changes and the move number is increased automatically.

Currently, the number of moves is restricted to 10, but this may be extended if there is the need for it.

= Examples =

A simple board with stones in all four corners
R5 C5 Q1 Ra1 Re5 Be1 Ba5

Numbered moves
R5 C5 Q1 Mc3 Ma3 Me3 Mb2 Md4