private static Direction ReadDirection(IIOManager ioManager) { ConsoleKeyInfo key; do { key = ioManager.ReadKey(); } while ( key.Key != ConsoleKey.LeftArrow && key.Key != ConsoleKey.UpArrow && key.Key != ConsoleKey.RightArrow && key.Key != ConsoleKey.DownArrow); return(GetDirection(key.Key)); }
private static Direction ReadDirection(IIOManager ioManager) { ConsoleKeyInfo key; do { key = ioManager.ReadKey(); } while ( key.Key != ConsoleKey.LeftArrow && key.Key != ConsoleKey.UpArrow && key.Key != ConsoleKey.RightArrow && key.Key != ConsoleKey.DownArrow); return GetDirection(key.Key); }