public class WebWalker
extends java.lang.Object
| Constructor and Description |
|---|
WebWalker(WebwalkGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
int |
distanceBetween(int x1,
int y1,
int x2,
int y2)
Returns a rough estimate of the distance of a webwalker path.
|
boolean |
webwalkTowards(int currentX,
int currentY,
int[][] endCoords)
Takes the first step towards the closest coordinate pair from the given array.
|
public WebWalker(WebwalkGraph graph)
public boolean webwalkTowards(int currentX,
int currentY,
int[][] endCoords)
currentX - the current X coordinatecurrentY - the current Y coordinateendCoords - the array of end coordinate pairs, where each pair is an array of two integers
[endX, endY]public int distanceBetween(int x1,
int y1,
int x2,
int y2)
x1 - int -- X1y1 - int -- Y1x2 - int -- X2y2 - int -- Y2