示例#1
0
文件: Board.cs 项目: pb0/ID0_Test
    void CreateMatchingResult()
    {
        /*
        Solver solver = new Solver(nextSequence != null ? nextSequence : sequence);
        matchingResult = solver.SearchPatternIn();
        */

        // ddong
        {
            Sequence targetSeq = nextSequence ?? sequence;
            Solver solver = new Solver(targetSeq);
            List<MatchResult> result = solver.SearchPatternIn();

            matchingResult = new List<Matching>();
            foreach (var entity in result)
            {
                Block[] targetBlocks = targetSeq.blocks.GetArrayInPattern(entity.pattern, entity.x, entity.y);
                matchingResult.Add(new Matching(puzzlePanel, entity.pattern, entity.x, entity.y, typeToEntity[entity.type], targetBlocks));
            }
        }
    }