예제 #1
0
파일: Game.cs 프로젝트: liappi/Mastermind
        private IEnumerable <Colours> ElicitValidInput()
        {
            renderer.PrintEnterFirstGuessMessage();
            var input = renderer.GetInput().Split(',');

            while (!inputValidator.HasValidNumberOfColours(input) || !inputValidator.HasValidColours(input))
            {
                PrintApplicableErrorMessages(input);

                renderer.PrintEnterAnotherGuessMessage();
                input = renderer.GetInput().Split(',');
            }

            return(inputProcessor.ProcessInput(input));
        }