ChessboardController constructor

ChessboardController({
  1. MoveCallback? onMove,
  2. CheckMateCallback? onCheckMate,
  3. CheckCallback? onCheck,
  4. DrawCallback? onDraw,
  5. bool enablePlay = true,
  6. 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;
}