Jump to content

Module:Xiangqi-position/doc

From Elite Dangerous Wiki

This is the documentation page for Module:Xiangqi-position

This module implements {{Xiangqi-position}}.

It renders a Xiangqi (Chinese chess) board based on positional codes passed as template parameters, with optional visual highlights.

Usage

{{Xiangqi-position
|rd|hd|ed|ad|gd|ad|ed|hd|rd
|  |  |  |  |  |  |  |  |
|  |cd|  |  |  |  |  |cd|
|sd|  |sd|  |sd|  |sd|  |sd
|  |  |  |  |  |  |  |  |
|  |  |  |  |  |  |  |  |
|sl|  |sl|  |sl|  |sl|  |sl
|  |cl|  |  |  |  |  |cl|
|  |  |  |  |  |  |  |  |
|rl|hl|el|al|gl|al|el|hl|rl
|25
}}

Highlighting

The module supports visual highlighting within board cells using special markers.

Marker Description
[ ] Highlights the square.
. Displays a dot on the square.

Highlight colors

The colors used for highlighted squares and dots can be customized using template parameters.

Parameter Description Default
highlightcolor Color used for highlighted squares ([ ]). #0f0
dotcolor Color used for dots (.). #0f0

Values may be any valid CSS color value (e.g. hex codes or named colors).

Notes

  • Parameter names are case-insensitive.
  • If a color parameter is omitted or invalid, the module falls back to its default value.
  • This module is intended for use via {{Xiangqi-position}} and is not designed to be called directly.