Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }