예제 #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();
        }