public GameRound NextRound() { var round = GameRound.FromPlayers(_players); _currentRound.OnNext(round); return(round); }
public static GameRound FromPlayers(IEnumerable <Player> players) { if (players == null) { throw new ArgumentNullException(nameof(players)); } var round = new GameRound(players); return(round); }
public void Start() { if (!_players.Any()) { throw new NotSupportedException("The game should have at least one player."); } if (!_started.HasValue) { _started = DateTime.UtcNow; } var round = GameRound.FromPlayers(_players); _round.Add(round); _currentRound.OnNext(round); }