// END CUT HERE // BEGIN CUT HERE public static void Main() { try { GuessTheNumberGame ___test = new GuessTheNumberGame(); ___test.run_test(-1); } catch (Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
// END CUT HERE // BEGIN CUT HERE public static void Main() { try { GuessTheNumberGame ___test = new GuessTheNumberGame(); ___test.run_test(-1); } catch(Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
public Object Post([FromBody] GuessTheNumberModel model) { if (model.PlayerGuess <= model.GuessingInterval[1] && model.PlayerGuess >= model.GuessingInterval[0]) { _model = model; _currentGame = new GuessTheNumberGame(_model, new int[] { }); _currentGame.CalculateNextTurn(); _currentGame.IsGameFinished(); return(model); } else { return(BadRequest()); } }
public object Post([FromBody] CreateGameModel GameToCreate) { Array.Sort(GameToCreate.GameInterval); object game = new object(); if (GameToCreate.SelectedGame == "Ishitori" && GameToCreate.GameInterval.Count() == 2) { IshitoriGame newGame = new IshitoriGame(_model, GameToCreate.GameInterval); game = _model; } else if (GameToCreate.SelectedGame == "GuessTheNumber" && GameToCreate.GameInterval.Count() == 2) { GuessTheNumberGame newGame = new GuessTheNumberGame(_modelGuess, GameToCreate.GameInterval); game = _modelGuess; } else { return(BadRequest()); } return(game); }
static void Main(string[] args) { GuessTheNumberGame c = new GuessTheNumberGame(); for (int i = 1000000; i >= 1; i--) { if (c.possibleClues(i) != c.possibleCluesWrong(i)) Console.Out.WriteLine(i); } object o = c.possibleClues(44); PrintObj(o); System.Console.In.ReadLine(); }