random method

Map<String, dynamic> random()

Returns a random starting position, with its ID and arrangement.

@returns {Object} An object with the starting position's ID and arrangement

Implementation

Map<String, dynamic> random() {
    int id = randomID();
    dynamic arrangement = decode(id);
    return {"id": id, "arrangement": arrangement};
  }