API
<shogi-board>
This is Shogi Board element.
Attributes
Name | Description | Type | Default |
editable | | boolean | false |
board | | Board | |
select | | Square | null | null |
Properties
Name | Attribute | Description | Type | Default |
editable | editable | | boolean | false |
board | board | | Board | |
select | select | | Square | null | null |
Events
Name | Description |
cell-click | |
<shogi-hand>
This is Shogi hand pieces element.
Attributes
Name | Description | Type | Default |
active | | boolean | false |
editable | | boolean | false |
color | | Color | |
hand | | Hand | {
[PieceType.FU]: 0,
[PieceType.KY]: 0,
[PieceType.KE]: 0,
[PieceType.GI]: 0,
[PieceType.KI]: 0,
[PieceType.KA]: 0,
[PieceType.HI]: 0,
[PieceType.OU]: 0,
} |
select | | Piece | null | null |
Properties
Name | Attribute | Description | Type | Default |
active | active | | boolean | false |
editable | editable | | boolean | false |
color | color | | Color | |
hand | hand | | Hand | {
[PieceType.FU]: 0,
[PieceType.KY]: 0,
[PieceType.KE]: 0,
[PieceType.GI]: 0,
[PieceType.KI]: 0,
[PieceType.KA]: 0,
[PieceType.HI]: 0,
[PieceType.OU]: 0,
} |
select | select | | Piece | null | null |
Events
Name | Description |
hand-piece-clicked | |
hand-color-clicked | |
<shogi-player>
A Shogi Player element.
Attributes
Name | Description | Type | Default |
title | The title of shogi player | string | "" |
sfen | The SFEN representation of initial position | string | "lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1" |
mode | The mode of shogi player | Mode | |
Properties
Name | Attribute | Description | Type | Default |
title | title | The title of shogi player | string | "" |
sfen | sfen | The SFEN representation of initial position | string | "lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1" |
mode | mode | The mode of shogi player | Mode | |
select | | | Select | null | null |
shogi | | | Shogi | new Shogi(...parseSfen(this.sfen)) |
Events