예제 #1
0
        /*
         * static int GetObstructionCount(int index1, int index2)
         * {
         * if (CheckInvalid(currentNode.NeighborNodes[index1])) {
         * if (CheckInvalid(currentNode.NeighborNodes[index2])) {
         *  return 2;
         * }
         * return 1;
         * }
         * if (CheckInvalid(currentNode.NeighborNodes[index2]))
         * return 1;
         * return 0;
         * }*/

        static bool CheckInvalid(GridNode gridNode)
        {
            return(gridNode.IsNull() || GridHeap.Closed(gridNode) || gridNode.Unpassable());
        }
예제 #2
0
 static bool CheckNeighborSearchable()
 {
     return(neighbor.IsNull() || GridHeap.Closed(neighbor));
 }
예제 #3
0
 static bool CheckNeighborSearchable()
 {
     return(neighbor.IsNotNull() && GridHeap.Closed(neighbor) == false);
 }