コード例 #1
0
        public Tournament(Tournament tournament)
        {
            Name     = tournament.Name;
            Location = tournament.Location;
            Date     = tournament.Date;

            foreach (var match in tournament.AllMatches)
            {
                Match newMatch = new Match(match);
                AllMatches.Add(newMatch);
            }

            TournamentId = tournament.TournamentId;
        }
コード例 #2
0
        public void CheckForMatches()
        {
            Traversed.Clear();
            AllMatches.Clear();

            for (int y = 0; y < Board.Rows; y++)
            {
                for (int x = 0; x < Board.Columns; x++)
                {
                    PuzzleOrb orb = GetOrbWithIndex(new Index2D(x, y));
                    if (Traversed.Contains(orb))
                    {
                        continue;
                    }

                    List <List <PuzzleOrb> > matchGroup = new List <List <PuzzleOrb> >();
                    TraverseOrb(orb, matchGroup);

                    if (matchGroup.Count > 0)
                    {
                        List <PuzzleOrb> matchedOrbs = new List <PuzzleOrb>();
                        for (int i = 0; i < matchGroup.Count; i++)
                        {
                            for (int j = 0; j < matchGroup[i].Count; j++)
                            {
                                if (!matchedOrbs.Contains(matchGroup[i][j]))
                                {
                                    matchedOrbs.Add(matchGroup[i][j]);
                                }
                            }
                        }
                        AllMatches.Add(matchedOrbs);
                    }
                }
            }
        }
コード例 #3
0
 public static void AddMatch(TournamentGroupLogMatch match)
 {
     AllMatches.Add(match);
 }