ChessboardController constructor
ChessboardController({
- MoveCallback? onMove,
- CheckMateCallback? onCheckMate,
- CheckCallback? onCheck,
- DrawCallback? onDraw,
- bool enablePlay = true,
- Chess? chessjsGame,
Implementation
ChessboardController({
this.onMove,
this.onCheckMate,
this.onCheck,
this.onDraw,
this.enablePlay = true,
chessjs.Chess? chessjsGame,
}) {
if (chessjsGame == null) {
gameLogic = chessjs.Chess();
} else
gameLogic = chessjsGame;
}