Class FieldModel
- java.lang.Object
-
- jadex.bdi.examples.hunterprey_classic.creature.hunters.ldahunter.potentialfield.FieldModel
-
public final class FieldModel extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FieldModel(int w, int h)
Constructor:FieldModel
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calcDistance(int mx, int my)
void
clearDistance()
clears the first buffervoid
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)
-
-
-
Method Detail
-
getNearerLocation
public final boolean getNearerLocation(Location loc)
- Parameters:
loc
- the location the values should be stored to (in, out)- Returns:
- false if this location has distance <= 0, true if location changed
-
calcDistance
public void calcDistance(int mx, int my)
- Parameters:
mx
- - from xmy
- - from y
-
goR
protected final int goR(int x, int y, int d)
- Parameters:
x
-y
-d
-- Returns:
- own distance
-
goD
protected final int goD(int x, int y, int d)
- Parameters:
x
-y
-d
-- Returns:
- own distance
-
goL
protected final int goL(int x, int y, int d)
- Parameters:
x
-y
-d
-- Returns:
- own distance
-
goU
protected final int goU(int x, int y, int d)
- Parameters:
x
-y
-d
-- Returns:
- own distance
-
clearDistance
public void clearDistance()
clears the first buffer
-
clearRange
public void clearRange(int x, int y, int r, int round)
- Parameters:
x
-y
-r
-round
-
-
-