Пример #1
0
 void Display(IEnumerable <Action> actions)
 {
     foreach (var action in actions)
     {
         MyConsole.Write($"> {action.Key}", ConsoleColor.Green);
         MyConsole.Write(" ");
         MyConsole.WriteLine(action.Name);
     }
 }
Пример #2
0
        ConsoleKeyInfo GetPlayerInput()
        {
            Console.WriteLine();
            MyConsole.Write("> ", ConsoleColor.Green);
            var keyInfo = MyConsole.ReadKey(ConsoleColor.Green);

            Console.WriteLine();
            return(keyInfo);
        }
Пример #3
0
        static void Main(string[] args)
        {
            var game = new Game();

            game.Start();

            MyConsole.WriteLine(Texts.CanExitNow);
            Console.ReadKey();
        }