public final class FieldModel
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
boolean[][] |
obstacles
obstacles obstacle in field model |
int[][] |
visits
visits |
| Constructor and Description |
|---|
FieldModel(int w,
int h)
Constructor:
FieldModel. |
| Modifier and Type | Method and Description |
|---|---|
void |
calcDistance(int mx,
int my) |
void |
clearDistance()
clears the first buffer
|
void |
clearRange(int x,
int y,
int r,
int round) |
boolean |
getNearerLocation(Location loc) |
protected int |
goD(int x,
int y,
int d) |
protected int |
goL(int x,
int y,
int d) |
protected int |
goR(int x,
int y,
int d) |
protected int |
goU(int x,
int y,
int d) |
public final boolean[][] obstacles
obstacles obstacle in field modelpublic final int[][] visits
visitspublic FieldModel(int w,
int h)
FieldModel.w - widthh - heightpublic final boolean getNearerLocation(Location loc)
loc - the location the values should be stored to (in, out)public void calcDistance(int mx,
int my)
mx - - from xmy - - from yprotected final int goR(int x,
int y,
int d)
x - y - d - protected final int goD(int x,
int y,
int d)
x - y - d - protected final int goL(int x,
int y,
int d)
x - y - d - protected final int goU(int x,
int y,
int d)
x - y - d - public void clearDistance()
public void clearRange(int x,
int y,
int r,
int round)
x - y - r - round -