Package com.mmoscene.h4j.habbohotel.pathfinding

Examples of com.mmoscene.h4j.habbohotel.pathfinding.Position.distanceFrom()


            v.lastID++;
            v.count++;
            v.getBinaryHeap()[v.count] = v.lastID;
            v.getX()[v.lastID] = n.getX();
            v.getY()[v.lastID] = n.getY();
            v.getH()[v.lastID] = (short) n.distanceFrom(end);
            v.getParent()[v.lastID] = p;

            if (n.getX() == v.getX()[p] || n.getY() == v.getY()[p]) {
                v.getG()[v.lastID] = (short) (10 + v.getG()[p]);
            } else {
View Full Code Here


            if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                continue;
            }

            if (pointer > n.distanceFrom(end)) {
                pointer = n.distanceFrom(end);
                p = n;
            }
        }
View Full Code Here

            if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                continue;
            }

            if (pointer > n.distanceFrom(end)) {
                pointer = n.distanceFrom(end);
                p = n;
            }
        }

        return p;
View Full Code Here

                if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                    continue;
                }

                if (distancePointer > n.distanceFrom(end)) {  //it's out of bounds
                    distancePointer = n.distanceFrom(end);
                    H4J.getLogger("a").info(limit + " => " + n.getX() + "|" + n.getY());
                    current = n;
                }
            }
View Full Code Here

                if (room.getModel().getSquares()[n.getX()][n.getY()] == SquareState.CLOSED) { //it's a closed tile anyways
                    continue;
                }

                if (distancePointer > n.distanceFrom(end)) {  //it's out of bounds
                    distancePointer = n.distanceFrom(end);
                    H4J.getLogger("a").info(limit + " => " + n.getX() + "|" + n.getY());
                    current = n;
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.