nextPlayer method

GenericGame nextPlayer()

Returns a copy of the GenericGame with the next player in the player array as the current player

Implementation

GenericGame nextPlayer() =>
    copyWith(currentPlayerIndex: (currentPlayerIndex! + 1) % players.length);