Exemplo n.º 1
0
        public override float Heuristic(MainNode goal)
        {
            Manhattan2DNode manhattan2Dnode = (Manhattan2DNode)goal;

            return(Math.Abs(manhattan2Dnode.X - X) + Math.Abs(manhattan2Dnode.Y - Y));
        }
Exemplo n.º 2
0
        public override bool NodeEqual(MainNode b)
        {
            Manhattan2DNode manhattan2Dnode = (Manhattan2DNode)b;

            return(manhattan2Dnode.X == X && manhattan2Dnode.Y == Y);
        }