clear method Null safety
Reset all of the instance variables
Implementation
void clear() {
board = []..length = 128;
kings = ColorMap(EMPTY);
turn = WHITE;
castling = ColorMap(0);
ep_square = EMPTY;
half_moves = 0;
move_number = 1;
history = [];
header = Map.from(DEFAULT_HEADER);
update_setup(generate_fen());
}