Пример #1
0
        public ActionResult OnGetGame(int game_id)
        {
            GameModel partialGame = new GameModel();

            partialGame.Id = game_id;
            GameBusinessService bs = new GameBusinessService();

            game = bs.getGame(partialGame);

            return(View("~/Views/Game/Board.cshtml", game));
        }
Пример #2
0
        // GET: Game
        public ActionResult Index()
        {
            AccountBusinessService accountBS = new AccountBusinessService();
            GameBusinessService    gameBS    = new GameBusinessService();

            int userActiveGameId = accountBS.getUser(Int32.Parse(Session["user_id"].ToString())).ActiveGameId;

            if (userActiveGameId != -1)
            {
                GameModel partialGame = new GameModel();
                partialGame.Id = userActiveGameId;
                GameBusinessService bs = new GameBusinessService();
                game = bs.getGame(partialGame);

                return(View("~/Views/Game/Board.cshtml", game));
            }

            return(View("Index"));
        }