Ejemplo n.º 1
0
Archivo: Solver.cs Proyecto: MOAAS/IART
        public ZhedStep zhedStep; //Zhed Step that created this node

        public Node(ZhedBoard board, Node parent, ZhedStep zhedStep, int value)
        {
            this.board    = board;
            this.parent   = parent;
            this.zhedStep = zhedStep;
            this.value    = value;
            this.height   = 0;

            while (parent != null)
            {
                this.height += 1;
                parent       = parent.parent;
            }
        }
Ejemplo n.º 2
0
Archivo: Solver.cs Proyecto: MOAAS/IART
        public ZhedStep zhedStep; //Zhed Step that created this node

        public Node(ZhedBoard board, Node parent, ZhedStep zhedStep, int value, int cost)
        {
            this.board    = board;
            this.parent   = parent;
            this.zhedStep = zhedStep;
            this.value    = value;
            if (parent == null)
            {
                this.cost = cost;
            }
            else
            {
                this.cost = parent.cost + cost;
            }

            while (parent != null)
            {
                this.height += 1;
                parent       = parent.parent;
            }
        }