private int AskUserTeamPlace() { DisplayPlaceQuestion(); do { ConsoleKeyInfo keyInfo = Console.ReadKey(true); if (keyInfo.IsInList(TeamBuilderConsts.TeamPlaces)) { return(keyInfo.GetKeyInt()); } } while (true); }
private int GetUserInput() { do { ConsoleKeyInfo keyInfo = Console.ReadKey(true); try { if (keyInfo.IsInList(UserConsts.UserTargetOptions)) { return(keyInfo.GetKeyInt()); } } catch { Display.DialogMessage(" Invalid Input ! (Number between 0-3) "); } Display.DialogMessage(" Invalid Input ! (Number between 0-3) "); } while (true); }