generate method

dynamic generate()

Returns a random starting position for Fischer Random Chess / Chess960.

see {link https://en.wikipedia.org/wiki/Fischer_Random_Chess_starting_position}

returns The starting position's arrangement of pieces

Implementation

dynamic generate() {
    int id = ((Random().nextInt(960)));
    return POSITIONS[id];
  }