Chinese Chess Board Representation

From Chessprogramming wiki
Revision as of 19:27, 22 May 2018 by GerdIsenberg (talk | contribs) (Created page with "'''Home * Games * Chinese Chess * Board Representation''' FILE:XiangqiBoardInChinesGardenRUB.jpg|border|right|thumb|Xiangqi board <ref>Xiangqi board i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Home * Games * Chinese Chess * Board Representation

Xiangqi board [1] [2]

The Chinese Chess (Xiangqi) board is a grid of 10 horizontal lines (ranks) and 9 vertical lines (files). The pieces are placed on the intersections. We can represent it with a sequence of 12x10=110 integers

a[0], a[1], ... , [119]. 

The actual board is represented by the entries

a[11] - a[19],...., a[101] - a[109]. 
 

The entries

a[0], a[10], a[20],... and a[110]-a[119] 

represent the edge of the board and are set the value -1.

See also

References