예제 #1
0
        private void StartGame(int row = 4, int col = 4)
        {
            ConsoleUIGame game = new ConsoleUIGame(row, col);

            string[] arr = game.GetWords();
            string[,] field = game.CreateField(arr);
            System.Console.Clear();
            ConsolePrint.PrintFieldCenter(field);
        }
예제 #2
0
        private void PlugMenuItem(string item)
        {
            System.Console.Clear();
            string[] output = { $"Тут однажды будет {item}", "Для выхода в главное меню нажмите любую клавишу..." };

            int top = (System.Console.WindowHeight / 2) - (output.Length / 2) - 1;

            ConsolePrint.PrintCenter(output, top, ConsoleColor.Green);
        }
예제 #3
0
        public void ShowMenu(int choice)
        {
            System.Console.Clear();

            ConsolePrint.PrintCenter(ConsoleTextMenu.GAME, 2, ConsoleColor.Green);

            int cursorTop = System.Console.CursorTop;

            ConsolePrint.PrintMenuCenter(ItemMenu, cursorTop + 5, 2, choice - 1);
        }
예제 #4
0
        public void Main()
        {
            System.Console.Clear();

            ConsolePrint.PrintCenter(TEXT_NEW_GAME, 2, ConsoleColor.Yellow);

            int cursorTop = System.Console.CursorTop;

            ConsolePrint.PrintCenter(TEXT_PLAYER_WELCOME, cursorTop + 5);

            int center = System.Console.WindowWidth / 2;

            System.Console.SetCursorPosition(center, cursorTop + 6);
            playerName = System.Console.ReadLine();
            StartGame();
        }