New board diagrams

From HexWiki
Revision as of 06:09, 21 August 2015 by Tommah (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is about the new diagram facility that was added in August 2015. For information on the old diagram facility, see Help:Hex. Both ways of making diagrams will work, but the new way is recommended.

To display a board diagram, include a <hexboard> tag, specifying the board size in the size attribute (e.g. 5x7) and the board position in the contents attribute.

Board sizes from 0 to 26 are supported.

The following values can be used in contents:

  • R (to place red pieces)
  • B (to place blue pieces)
  • E (to mark a cell as empty)

When a cell name is encountered, that cell will be marked with the most recently mentioned color (R/B/E). To include an annotation on a cell (a number, star, or plus sign), include it before the cell name, with a colon between the annotation and the cell.

By default, coordinates will be shown above and to the left of the board. If you do not wish to show these, specify coords="hide".

Remember to close the tag!

There is now a graphical tool to create these tags: It lets you set up a board, then generates a tag that you can copy and paste. Click on a piece type to choose it, then click on a board cell to place that piece on the cell.

Example 1

<hexboard size="3x3" contents="" />


Example 2

   contents="R c1 b3 a5   B a1 e5"


Example 3

   contents="R 1:d1 b4
             B 2:c3
             E +:a2 *:c4"