toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'board': board.toJson(),
  'activePiece': activePiece?.toJson(),
  'heldPiece': heldPiece?.toJson(),
  'canHold': canHold,
  'nextQueue': nextQueue.map((t) => t.index).toList(),
  'scoreState': scoreState.toJson(),
  'levelState': levelState.toJson(),
  'status': status.index,
};