setNextPlayer method

GenericGame setNextPlayer(
  1. PlayerID player
)

Returns a copy of the GenericGame with the current player being the one with id player

Implementation

GenericGame setNextPlayer(PlayerID player) =>
    copyWith(currentPlayerIndex: players.indexWhere((p) => p.id == player));