Example #1
0
        private Tile addToAStarHighlight(Tile toadd, Tile prev)
        {
            int x = toadd.getX();
            int y = toadd.getY();
            int mapx = toadd.getMapX();
            int mapy = toadd.getMapY();
            int len = toadd.getLength();

            if(DEBUG)
                Console.WriteLine("Adding tile at (" + mapx + "," + mapy + ") to bestpath! Cost is " + toadd.getTotalCost());

            Tile newadd = new Tile(mapx, mapy, x, y, len, new Tool(WorldTile.BLACK, astarwaypoint));
            newadd.setPrevious(prev);
            return newadd;
        }