private void Show()
 {
     ioComponent.WriteOutputLine("--------------");
     foreach (int num in m_arrayDoorsValue)
     {
         ioComponent.WriteOutput(num + " ");
     }
     ioComponent.WriteOutputLine();
     ioComponent.WriteOutputLine("--------------");
 }
Example #2
0
        private int GetUserNumber()
        {
            bool isNumber = false;
            int  enteredNum;

            do
            {
                if (int.TryParse(Console.ReadLine(), out enteredNum))
                {
                    ioComp.WriteOutput(phraseProvider.GetPhrase("Selected") + $"{enteredNum}");
                    if (this.CheckInput(enteredNum) != -1)
                    {
                        isNumber = true;
                    }
                }

                else
                {
                    ioComp.WriteOutput(phraseProvider.GetPhrase("NotNumber"));
                }
            }while (!isNumber);
            return(enteredNum);
        }