Note: the board UI methods will automatically start working when isepic-chess-ui.js is present, otherwise nothing will happen when they are called.
Boards created by Ic.initBoard()
have the following available UI methods:
- board.refreshUi()
Function | Parameters | Return | UI refresh? | Description |
---|---|---|---|---|
refreshUi( animationType, playSounds ) |
✴️Optional Parameter |
- | Yes | This method will:
animationType is a falsy-value, no animation will happen.If animationType is a positive number, the board will be refreshed with an animation as if the last move was played.If animationType is a negative number, the board will be refreshed with an animation as if the next move was reverted.If playSounds is a truthy-value, a sound might be played depending on multiple factors (if sound effects are not disabled in the configuration or by the browser). The sounds might get supressed by browers if the method was not fired from a click or keypress.Examples:
|