Beispiel #1
0
        public void WonPoint(string playerName)
        {
            if (playerName == scorer.PlayerOneName)
            {
                scorer = scorer.PlayerOneWin();
                return;
            }

            if (playerName == scorer.PlayerTwoName)
            {
                scorer = scorer.PlayerTwoWin();
                return;
            }

            throw new InvalidOperationException($"Unknown player name: {playerName}");
        }