Ejemplo n.º 1
0
        public async Task<ActionResult> NewSinglePlayer()
        {
            var player = ApplicationUser.GetCurrentPlayer(this.HttpContext);
            var bounds = new DomainModel.Bounds(8, 8);
            var properties = new DomainModel.GameProperties(bounds, 3, 2);

            var game = await this.gameService.CreateSinglePlayerGameAsync(player, properties);
            return RedirectToAction("Play", new { id = game.ID });
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> NewSinglePlayer()
        {
            var player     = ApplicationUser.GetCurrentPlayer(this.HttpContext);
            var bounds     = new DomainModel.Bounds(8, 8);
            var properties = new DomainModel.GameProperties(bounds, 3, 2);

            var game = await this.gameService.CreateSinglePlayerGameAsync(player, properties);

            return(RedirectToAction("Play", new { id = game.ID }));
        }