InsanichessGame constructor

InsanichessGame({
  1. required String id,
  2. required InsanichessPlayer whitePlayer,
  3. required InsanichessPlayer blackPlayer,
  4. required InsanichessTimeControl timeControl,
})

Constructs a fresh game with initial position.

Implementation

InsanichessGame({
  required this.id,
  required this.whitePlayer,
  required this.blackPlayer,
  required this.timeControl,
})  : remainingTimeWhite = timeControl.initialTime,
      remainingTimeBlack = timeControl.initialTime,
      timesSpentPerMove = <Duration>[],
      super();