public void Randomize()
        {
            TournMatchArray tournMatchArray = new TournMatchArray();

            while (this.Count > 0)
            {
                int index = Common.RandomGenerator.Next(this.Count - 1);
                tournMatchArray.AddMatch(this[index]);
                this.RemoveAt(index);
            }
            this.Append((ITournMatchArray)tournMatchArray);
        }
        public ITournMatchArray GetByPlayer(long PlayerId)
        {
            TournMatchArray tournMatchArray = new TournMatchArray();

            foreach (TournMatch tournMatch in (List <ITournMatch>) this)
            {
                if (tournMatch.Players.HasPlayer(PlayerId))
                {
                    tournMatchArray.AddMatch((ITournMatch)tournMatch);
                }
            }
            return((ITournMatchArray)tournMatchArray);
        }
        public ITournMatchArray GetByPoints(int round, int highPoint, int lowPoint)
        {
            TournMatchArray tournMatchArray = new TournMatchArray();

            foreach (TournMatch tournMatch in (List <ITournMatch>) this)
            {
                if (tournMatch.Points <= highPoint && tournMatch.Points >= lowPoint && tournMatch.Round == round)
                {
                    tournMatchArray.AddMatch((ITournMatch)tournMatch);
                }
            }
            return((ITournMatchArray)tournMatchArray);
        }
        public ITournMatchArray GetByRound(
            int highRound,
            int lowRound,
            bool hideCompleted)
        {
            TournMatchArray tournMatchArray = new TournMatchArray();

            foreach (TournMatch tournMatch in (List <ITournMatch>) this)
            {
                if (tournMatch.Round >= lowRound && tournMatch.Round <= highRound && (tournMatch.Status == TournMatchResult.Incomplete || !hideCompleted))
                {
                    tournMatchArray.AddMatch((ITournMatch)tournMatch);
                }
            }
            return((ITournMatchArray)tournMatchArray);
        }
        public ITournMatchArray GetPairedDown(int round)
        {
            TournMatchArray tournMatchArray = new TournMatchArray();

            foreach (ITournMatch match in (IEnumerable <ITournMatch>) this.GetByRound(round))
            {
                if (match.Players.HasPlayer(Player.BYE_ID))
                {
                    tournMatchArray.AddMatch(match);
                }
                else if (match.Players[0].Tie1_Wins != match.Players[1].Tie1_Wins)
                {
                    tournMatchArray.AddMatch(match);
                }
            }
            return((ITournMatchArray)tournMatchArray);
        }