Exemplo n.º 1
0
        private ISuit _humanChooseSuit()
        {
            var suitsToChooseFrom = CardHelper.GetSuitsToChooseFrom(_gameState.TurnedUpCard.Suit);

            var renderedSuits = _suitRenderer.RenderSuits(suitsToChooseFrom, true);

            System.Console.WriteLine(renderedSuits);

            var keyPressed =
                _inputHelper.GetValidInput(
                    "Choose a suit or pass:"******"{_gameState.CurrentPlayer.Name} has decided to pass.");
                return(null);
            }
            else
            {
                var trumpIndex = int.Parse(keyPressed.ToString());
                return(suitsToChooseFrom[trumpIndex - 1]);
            }
        }