public IActionResult Hold() { var session = new PigSession(HttpContext.Session); var game = session.GetGame(); game.Hold(); session.SetGame(game); return(RedirectToAction("Index")); }
public IActionResult NewGame() { //call newgame class and store that game in the session. var session = new PigSession(HttpContext.Session); var game = session.GetGame(); //call new game game.NewGame(); //put game back into our session session.SetGame(game); //redirect to Indexs action return(RedirectToAction("Index")); }