Difference between revisions of "Help:Hex"

From HexWiki
Jump to: navigation, search
(Examples for Complete Diagrams: another)
(All possible fields: Added a row with moves)
Line 67: Line 67:
  
 
<hex>
 
<hex>
Q1 C11 R3
+
Q1 C11 R4
 
Ra1 R1b1 R2c1 R3d1 R4e1 R5f1 R6g1 R7h1 R8i1 R9j1 R0k1
 
Ra1 R1b1 R2c1 R3d1 R4e1 R5f1 R6g1 R7h1 R8i1 R9j1 R0k1
 
Ba2 B1b2 B2c2 B3d2 B4e2 B5f2 B6g2 B7h2 B8i2 B9j2 B0k2
 
Ba2 B1b2 B2c2 B3d2 B4e2 B5f2 B6g2 B7h2 B8i2 B9j2 B0k2
 
Sa3 *b3 Pd3 +e3
 
Sa3 *b3 Pd3 +e3
 +
Ma4 Mb4 Mc4 Md4 Me4 Mf4 Mg4 Mh4 Mi4 Mj4 Mk4
 
</hex>
 
</hex>

Revision as of 04:07, 17 September 2007

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 <hex>...</hex> 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

The commands for setting up the board all take a single numeric argument. The commands are:

  • R: Specifies the number of rows of the board.
  • C: Specifies the number of columns of the board.
  • Q: Specifies whether the coordinates should be printed next to the board. Zero means no, any other number means yes. By default, they are not shown.

Examples

  • R5 sets the number of rows to 5.
  • Q1 makes the coordinates appear next to the board.
  • Q0 explicitly makes the coordinates disappear.

Setting up single 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.

Examples

  • Ba4 puts a blue stone (B) in the first column (a) of the fourth row (4).
  • R7b1 puts a red stone (R) in the second column (b) of the first row (1) and labels it with a seven (7).

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 for Complete Diagrams

A simple board with stones in all four corners

abcde12345

Numbered moves

abcde1234542135

All possible fields

abcdefghijk12341234567891234567891234567891011