public ActionResult MatchesByEngine(string tournament, string engine) { if (tournament == null || tournament.Contains(".")) throw new ArgumentException(); GomokuMatchInfoModel[] matches = GetMatchesModelByTournament(tournament); matches = matches .Where(m => m.Player1 == engine || m.Player2 == engine) .ToArray(); TournamentMatch model = new TournamentMatch() { Matches = matches, Tournament = tournament, }; return View("Matches", model); }
public ActionResult Matches(string tournament) { if (tournament == null || tournament.Contains(".")) throw new ArgumentException(); GomokuMatchInfoModel[] matches = GetMatchesModelByTournament(tournament); TournamentMatch model = new TournamentMatch() { Matches = matches, Tournament = tournament, }; return View(model); }