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 }); }
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 })); }
public GameBoard(GameProperties properties, IEnumerable <Token> tokens) { this.properties = properties; this.tokens = new Token[properties.Bounds.Rows, properties.Bounds.Cols]; foreach (var token in tokens) { this.tokens[token.Row, token.Col] = token; } }