Пример #1
0
 private void InitializeInstances()
 {
     _board = new Board();
     _ball  = new Ball(_board);
     _      = new MainMenu();
     UIUtilities.ClearTitles();
     _firstPlayer = new Player(_board);
 }
Пример #2
0
        private string SetPlayerName()
        {
            if (IsSecondUserAndPlaySingle())
            {
                return(_computer);
            }

            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.SetCursorPosition(3, 7);
            Console.Write($"Enter -player{_playersCount}'s- name: ");

            string playerName = Console.ReadLine();

            UIUtilities.ClearTitles();
            Console.ForegroundColor = ConsoleColor.White;
            return(playerName);
        }