public void Merge(PatternMergedAttributes patternMergedAttributes)
        {
            MinTerritorialValue = Compare.Max(MinTerritorialValue, patternMergedAttributes.MinTerritorialValue);
            MaxTerritorialValue = Compare.Min(MaxTerritorialValue, patternMergedAttributes.MaxTerritorialValue);
            MinValue            = Compare.Max(MinValue, patternMergedAttributes.MinTerritorialValue);
            MaxValue            = Compare.Min(MaxValue, patternMergedAttributes.MaxValue);

            AdjShapeFactor    = Compare.Max(AdjShapeFactor, patternMergedAttributes.AdjShapeFactor);
            AdjFollowupFactor = Compare.Max(AdjFollowupFactor, patternMergedAttributes.AdjFollowupFactor);
        }
Exemple #2
0
        public void Add(Pattern pattern, int transformation, Coordinate origin, int location)
        {
            if (pattern.PatternCompiled.Match(Board, Player, origin, transformation) == PatternFunctions.FALSE)
            {
                return;
            }

            Patterns.Add(new PatternHit(pattern, transformation, origin));

            if (MergedAttributes[location] == null)
            {
                MergedAttributes[location] = new PatternMergedAttributes();
            }

            MergedAttributes[location].Merge(pattern);
        }
        public void Merge(PatternMergedAttributes patternMergedAttributes)
        {
            MinTerritorialValue = Compare.Max(MinTerritorialValue, patternMergedAttributes.MinTerritorialValue);
            MaxTerritorialValue = Compare.Min(MaxTerritorialValue, patternMergedAttributes.MaxTerritorialValue);
            MinValue = Compare.Max(MinValue, patternMergedAttributes.MinTerritorialValue);
            MaxValue = Compare.Min(MaxValue, patternMergedAttributes.MaxValue);

            AdjShapeFactor = Compare.Max(AdjShapeFactor, patternMergedAttributes.AdjShapeFactor);
            AdjFollowupFactor = Compare.Max(AdjFollowupFactor, patternMergedAttributes.AdjFollowupFactor);
        }