Exemplo n.º 1
0
        public IActionResult Hold()
        {
            var session = new PigSession(HttpContext.Session);
            var game    = session.GetGame();

            game.Hold();
            session.SetGame(game);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        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"));
        }