clear method

dynamic clear()

Reset all of the instance variables

Implementation

clear() {
  board = List.filled(128, null, growable: false);
  kings = ColorMap(EMPTY);
  turn = WHITE;
  castling = ColorMap(0);
  epSquare = EMPTY;
  halfMoves = 0;
  moveNumber = 1;
  history = [];
  header = {};
  updateSetup(generateFen());
}