A hexagonal chess board used for playing Glinsky-style hex chess.
Player variables
| Name | Parameters | Description | Return |
| requestUpdate |
| Name | Description | Type |
| _property | | string |
| | void |
| export | | Exports the current game to a CSV list of moves that can be fed back into this same component. | string |
| fen | | Converts to a hex-FEN notation describing the state of the board.
Includes the positions of all the pieces along with whose turn it is. | string |
| flip | | Flip the orientation of the board. | void |
| resize | | Resize the board based on the latest dimensions given to the shadow root. | void |
| rewind | | Rewinds one move to a previous position.
If there are no previous moves, this does nothing. | void |
| rewindAll | | Rewinds all moves until the starting position of the board is reached. | void |
| fastForward | | Fast forwards one move to the next position.
If there are no next moves, this does nothing. | void |
| fastForwardAll | | Fast forwards all moves until the current state of the board is reached. | void |
| freeze | | Prevent any more moves to the game.
Usually called when the game is over. | void |
| unfreeze | | Unfreeze the board and re-enable moves to be made. | void |
| move |
| Name | Description | Type |
| from | | string |
| Make a move on the board. | |
| move |
| Name | Description | Type |
| from | | Square |
| to | | Square |
| | boolean |
| move |
| Name | Description | Type |
| arg | | string | Square |
| to | | Square |
| | boolean |
| promote |
| Name | Description | Type |
| piece | | Piece |
| Promote a pawn. | |
| reset | | Resets and unfreezes the board to the default start state. | void |
| prepareAudio | | Preloads the configured audio files and unlocks playback.
Call this inside a user gesture handler if you need audio before any board interaction occurs. | Promise |
| stopCustomEvents | | Pauses all custom events from being emitted.
This is useful when replaying many pre-programmed moves. | void |
| restartCustomEvents | | | void |
| Name | Description |
| --hexchess-playername-size | The font size of the player names. |
| --hexchess-playername-color | The color of the player names. Board variables |
| --hexchess-board-bg | The background color of the whitespace of the board (not tiles). |
| --hexchess-board-bg-light | Light mode override for the board background color. |
| --hexchess-board-bg-dark | Dark mode override for the board background color. |
| --hexchess-white-bg | The background color of the white tiles. |
| --hexchess-white-bg-light | Light mode override for the white tiles. |
| --hexchess-white-bg-dark | Dark mode override for the white tiles. |
| --hexchess-selected-white-bg | The background color of a white tile that's selected to be moved. |
| --hexchess-selected-white-bg-light | Light mode override for selected white tiles. |
| --hexchess-selected-white-bg-dark | Dark mode override for selected white tiles. |
| --hexchess-black-bg | The background color of the black tiles. |
| --hexchess-black-bg-light | Light mode override for the black tiles. |
| --hexchess-black-bg-dark | Dark mode override for the black tiles. |
| --hexchess-selected-black-bg | The background color of a black tile that's selected to be moved. |
| --hexchess-selected-black-bg-light | Light mode override for selected black tiles. |
| --hexchess-selected-black-bg-dark | Dark mode override for selected black tiles. |
| --hexchess-grey-bg | The background color of the grey tiles. |
| --hexchess-grey-bg-light | Light mode override for the grey tiles. |
| --hexchess-grey-bg-dark | Dark mode override for the grey tiles. |
| --hexchess-selected-grey-bg | The background color of a grey tile that's selected to be moved. |
| --hexchess-selected-grey-bg-light | Light mode override for selected grey tiles. |
| --hexchess-selected-grey-bg-dark | Dark mode override for selected grey tiles. |
| --hexchess-label-bg | The background color of the column and row labels. |
| --hexchess-label-bg-light | Light mode override for label color. |
| --hexchess-label-bg-dark | Dark mode override for label color. |
| --hexchess-label-size | The font size of the column and row labels. |
| --hexchess-possible-move-bg | The fill color of the small dot shown on a hexagon indicating this is a legal move. |
| --hexchess-possible-move-bg-light | Light mode override for the legal move dot. |
| --hexchess-possible-move-bg-dark | Dark mode override for the legal move dot. |
| --hexchess-possible-move-opponent-bg | The fill color of the small dot shown on a hexagon indicating this is a move an opponent piece can make. |
| --hexchess-possible-move-opponent-bg-light | Light mode override for the opponent move dot. |
| --hexchess-possible-move-opponent-bg-dark | Dark mode override for the opponent move dot. |
| --hexchess-possible-capture-bg | The stroke color of the large circle outlining a piece that can be captured. |
| --hexchess-possible-capture-bg-light | Light mode override for the capture ring color. |
| --hexchess-possible-capture-bg-dark | Dark mode override for the capture ring color. |
| --hexchess-possible-move-stroke-white | The outline color of a hexagon when the user drags over a white square, trying to move there. |
| --hexchess-possible-move-stroke-white-light | Light mode override for white square drag outlines. |
| --hexchess-possible-move-stroke-white-dark | Dark mode override for white square drag outlines. |
| --hexchess-possible-move-stroke-grey | The outline color of a hexagon when the user drags over a grey square, trying to move there. |
| --hexchess-possible-move-stroke-grey-light | Light mode override for grey square drag outlines. |
| --hexchess-possible-move-stroke-grey-dark | Dark mode override for grey square drag outlines. |
| --hexchess-possible-move-stroke-black | The outline color of a hexagon when the user drags over a black square, trying to move there. |
| --hexchess-possible-move-stroke-black-light | Light mode override for black square drag outlines. |
| --hexchess-possible-move-stroke-black-dark | Dark mode override for black square drag outlines. |
| --hexchess-possible-move-stroke-opponent | The outline of a square when dragging an opponent piece to a possible move. |
| --hexchess-possible-move-stroke-opponent-light | Light mode override for opponent drag outlines. |
| --hexchess-possible-move-stroke-opponent-dark | Dark mode override for opponent drag outlines. |