InsanichessLiveGame constructor

InsanichessLiveGame({
  1. required bool undoAllowed,
  2. required String id,
  3. required InsanichessPlayer whitePlayer,
  4. required InsanichessPlayer blackPlayer,
  5. required InsanichessTimeControl timeControl,
})

Constructs new InsanichessLiveGame object.

Field playerOfferedDraw is set to null at the start and can only be changed when the game is in progress.

Field undoAllowed indicates whether both whitePlayer and blackPlayer approve of allowing undo requests. This field is final and cannot be changed during the game.

Arguments id, whitePlayer, blackPlayer and timeControl are forwarded to InsanichessGame constructor.

Implementation

InsanichessLiveGame({
  required this.undoAllowed,
  required String id,
  required InsanichessPlayer whitePlayer,
  required InsanichessPlayer blackPlayer,
  required InsanichessTimeControl timeControl,
}) : super(
        id: id,
        whitePlayer: whitePlayer,
        blackPlayer: blackPlayer,
        timeControl: timeControl,
      );