Ejemplo n.º 1
0
        public void PlayerVoteCard(Player player, Card card)
        {
            if (GameState != State.Voting)
            {
                throw new InvalidOperationException($"Invalid game state {GameState.DisplayName} for PlayerVoteCard command");
            }


            if (!CurrentPlayedCards.Contains(card))
            {
                throw new InvalidOperationException($"Player {player.Name} cannot vote for a card that hasn't been played.");
            }

            CurrentRound.PlayerVoteCard(player, card);
        }