<shogi-player>

A web component for shogi game.

API

<shogi-board>

This is Shogi Board element.

Attributes

NameDescriptionTypeDefault
editablebooleanfalse
boardBoard
selectSquare | nullnull

Properties

NameAttributeDescriptionTypeDefault
editableeditablebooleanfalse
boardboardBoard
selectselectSquare | nullnull

Events

NameDescription
cell-click

<shogi-hand>

This is Shogi hand pieces element.

Attributes

NameDescriptionTypeDefault
activebooleanfalse
editablebooleanfalse
colorColor
handHand{ [PieceType.FU]: 0, [PieceType.KY]: 0, [PieceType.KE]: 0, [PieceType.GI]: 0, [PieceType.KI]: 0, [PieceType.KA]: 0, [PieceType.HI]: 0, [PieceType.OU]: 0, }
selectPiece | nullnull

Properties

NameAttributeDescriptionTypeDefault
activeactivebooleanfalse
editableeditablebooleanfalse
colorcolorColor
handhandHand{ [PieceType.FU]: 0, [PieceType.KY]: 0, [PieceType.KE]: 0, [PieceType.GI]: 0, [PieceType.KI]: 0, [PieceType.KA]: 0, [PieceType.HI]: 0, [PieceType.OU]: 0, }
selectselectPiece | nullnull

Events

NameDescription
hand-piece-clicked
hand-color-clicked

<shogi-player>

A Shogi Player element.

Attributes

NameDescriptionTypeDefault
titleThe title of shogi playerstring""
sfenThe SFEN representation of initial positionstring"lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1"
modeThe mode of shogi playerMode

Properties

NameAttributeDescriptionTypeDefault
titletitleThe title of shogi playerstring""
sfensfenThe SFEN representation of initial positionstring"lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1"
modemodeThe mode of shogi playerMode
selectSelect | nullnull
shogiShoginew Shogi(...parseSfen(this.sfen))

Events

NameDescription
update