static void Main(string[] args) { ConsoleKey Pressed; do { Menu(); Pressed = Console.ReadKey().Key; Action(Pressed); }while (!Pressed.Equals(ConsoleKey.Escape)); }
public Task() { ConsoleKey Pressed; Data = new List <T>(); ShowMenu(); do { Pressed = Console.ReadKey().Key; Action(Pressed); }while (!Pressed.Equals(ConsoleKey.Escape)); }
public Menu() { game = new Logic.Menu(); ConsoleKey Pressed; do { PrintMap(); PrintPlayerData(); Pressed = Console.ReadKey().Key; var direction = GetAction(Pressed); game.NextTurn(direction); }while (!Pressed.Equals(ConsoleKey.Escape)); }