Пример #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));
        }