MovePlayedGameEvent constructor

const MovePlayedGameEvent(
  1. {required Move move,
  2. Duration? timeSpent,
  3. PieceColor? player}
)

Creates new MovePlayedGameEvent with move and optional timeSpent for this move. The server always sets timeSpent but if client sets it, it is simply ignored by the server.

Implementation

const MovePlayedGameEvent({
  required this.move,
  this.timeSpent,
  this.player,
}) : super(GameEventType.movePlayed, isBroadcasted: true);