Package pr.lib

Examples of pr.lib.Dir


    World world;

    Vec[][] getNeigborPaths(Vec p, Dir d) {
        Vec[][] paths = new Vec[4][2];
        for (int i = 0; i < 4; i++) {
            Dir pd = d.turn(Turn.values()[i]);
            paths[i][0] = p.InDirection(pd);
            paths[i][1] = paths[i][0].InDirection(pd);
        }
        return paths;
    }
View Full Code Here


    private void randomWalk(Vec p, Dir d, int steps, int baseScore, int noRepeatScore, int noBackTrackScore, int noTurnScore) {
        set(p);
        for (int i = 0; i < steps; i++) {
            int[] pSpotsScores = new int[4];
            for (int j = 0; j < 4; j++) {
                Dir pd = d.turn(Turn.values()[j]);
                Vec pHallSpot = p.InDirection(pd);
                Vec pSpot = pHallSpot.InDirection(pd);

                if (pSpot.distanceTo(world.midpoint) >= world.width / 2) {
                    //Debug.log(pSpot+" " + j+ " is out of bounds! ");
View Full Code Here

TOP

Related Classes of pr.lib.Dir

Copyright © 2018 www.massapicom. 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.