コード例 #1
0
        private bool DoMerge()
        {
            bool canMerge = CanMerge();

            if (canMerge)
            {
                FinalistData first = GetShallowNode();
                SingleEliminationFinal.RemoveFinalist(first);

                FinalistData second = GetShallowNode();
                SingleEliminationFinal.RemoveFinalist(second);

                MatchNode newMatch = GenerateMatchNode();
                newMatch.AddFinalist(first);
                newMatch.AddFinalist(second);

                SingleEliminationFinal.AddFinalist(newMatch, MatchOutcome.OneVsOneWinner);
                SingleEliminationGames.Add(newMatch);

                canMerge = CanMerge();
            }

            return(canMerge);
        }