Ejemplo n.º 1
0
    public override MatchInfo GetMatch()
    {
        MatchInfo        matchInfo       = BoardController.GetCrossMatch(this, validateGem);
        List <MatchInfo> matchInfosChain = new List <MatchInfo>();

        activated = true;

        foreach (var blender in blenders)
        {
            MatchInfo blenderChain = blender.GetMatch();
            blenderChain.RemoveMatches(matchInfo.matches);
            matchInfosChain.ForEach(m => blenderChain.RemoveMatches(m.matches));
            matchInfosChain.Add(blenderChain);
            matchInfosChain.AddRange(blenderChain.specialMatches);
        }

        matchInfo.specialMatches.AddRange(matchInfosChain);

        return(matchInfo);
    }