public static void NewGame(GameController Controller) { int buyin, bounty; DateTime gameDate; while (true) { Console.Write("Enter game date: "); try { gameDate = DateTime.Parse(Console.ReadLine()); } catch (Exception) { Console.WriteLine("Jesus Christ, enter a f*****g date."); continue; } break; } gameDate = gameDate.AddHours(19); while (true) { Console.Write("Enter Buyin: "); try { buyin = int.Parse(Console.ReadLine()); } catch (Exception) { Console.WriteLine("Are you tarded?"); continue; } break; } while (true) { Console.Write("Enter Bounty (default 0): "); string input = Console.ReadLine(); try { bounty = input.Equals("") ? 0 : int.Parse(input); } catch (Exception) { Console.WriteLine("I said bounty fucktwat"); continue; } break; } Controller.NewGame(gameDate, buyin, bounty == 0 ? (int?)null : bounty, null); }
public void SetUpAllTheThings() { Repo = new pokerpalooza_repo(ConfigurationManager.ConnectionStrings["pokerpalooza-db"].ConnectionString); Controller = new GameController(Repo); Controller.NewGame(DateTime.Now, 10, null, null); }