Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class MovesExtensions
- {
- public static ConsoleKey ToConsoleKey(this string move)
- => move switch
- {
- Constants.Moves.Up => ConsoleKey.UpArrow,
- Constants.Moves.Down => ConsoleKey.DownArrow,
- Constants.Moves.Left => ConsoleKey.LeftArrow,
- Constants.Moves.Right => ConsoleKey.RightArrow,
- _ => ConsoleKey.None
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement