예제 #1
0
        //結合度を得る
        private int getScore(Poly dstPoly, Poly srcPoly, int dstPointId, int srcPointId, int direction, bool turnflag, int bestScore)
        {
            Poly clonedSrcPoly = new Poly(new List <Point>(srcPoly.points), null, true, false);

            if (turnflag)
            {
                clonedSrcPoly.Turn(false);
            }
            move(dstPoly, clonedSrcPoly, dstPointId, srcPointId, direction);
            int score = Poly.Evaluation(dstPoly, clonedSrcPoly, dstPointId, srcPointId);

            if (score < bestScore || dstPoly.isHitLine(clonedSrcPoly))
            {
                score = -1;
            }
            return(score);
        }