示例#1
0
        public RetourAPI CreateMatchAllPairing(Round Round)
        {
            List <int> Players = new();

            foreach (ViewParticipant p in DB_CURD.GetParticipantsOf(Round.IdTournament))
            {
                if (!p.Drop)
                {
                    Players.Add(p.IdUser);
                }
            }

            List <ViewScoreClassementTemporaire> Classements =
                DB_CURD.GetScoreClassementTemporairesOfTournamnent(Round.IdTournament);
            List <ViewMatch> Matches = DB_CURD.GetMatchesOf(Round.IdTournament);
            ViewTournament   Tournoi = DB_CURD.GetTournament(Round.IdTournament);

            List <PairID> PairingList = AlgoPairing.Pairing(Players, Classements, Matches, Round.RoundNumber);

            return(DB_CURD.CreateMatchAllParing(Round, PairingList));
        }
示例#2
0
 public IEnumerable <ViewMatch> GetMatchsOfTournament([FromQuery] int IdTournoi)
 {
     return(DB_CURD.GetMatchesOf(IdTournoi));
 }