public ActionResult OnGet(int?gameId, int?yIndex, int?xIndex) { if (gameId == null) { return(RedirectToPage("./StartGame")); } bool openCell = IsChecked == "true"; GameId = gameId.Value; GameEngine.RestoreGameStateFromDb(gameId.Value); GameEngine.SetNumberOfMinesOnBoard(); if (yIndex != null && xIndex != null) { MoveState = GameEngine.MoveForWebApp(yIndex.Value, xIndex.Value, openCell); GameEngine.SaveGame(gameId.Value); } return(Page()); }