Пример #1
0
        private int HeuristicCostEstimate(RubickMatrix _node)
        {
            int estimate = 0;

            for (int i = 4; i < 12; i++)
            {
                var my     = _node.GetRelatives(i);
                var target = RubickMatrix.GetSpectedRelatives(_node.GetValue(i));
                for (int j = 0; j < my.Length; j++)
                {
                    if (my[j] != target[j])
                    {
                        estimate++;
                    }
                }
            }
            return(estimate);
        }