|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascape.model.AscapeObject
org.ascape.model.rule.Rule
org.ascape.model.rule.MoveRandomWithin
public class MoveRandomWithin
A rule causing the taget agent to move to a random location within some bounded area.
| Field Summary |
|---|
| Fields inherited from class org.ascape.model.AscapeObject |
|---|
ARBITRARY_SEED, name, PLATFORM_DEFAULT_COLOR, scape |
| Constructor Summary | |
|---|---|
MoveRandomWithin()
Constructs a new move random within rule, with no area defined. |
|
MoveRandomWithin(int x,
int y,
int width,
int height)
Constructs a new move random within rule, causing the agenst to move to a random location within the area defined. |
|
| Method Summary | |
|---|---|
void |
execute(Agent agent)
Move to a random location in the lattice. |
boolean |
isCauseRemoval()
Returns false. |
void |
setArea(int x,
int y,
int width,
int height)
The agent must select its new location from within this area. |
| Methods inherited from class org.ascape.model.rule.Rule |
|---|
getScape, isIterateAll, isRandomExecution, setScape |
| Methods inherited from class org.ascape.model.AscapeObject |
|---|
clone, diffDeep, diffDeep, diffDeepBFS, diffDeepDFS, diffDeepValidate, diffDeepVisit, equalsDeep, equalsDeep, equalsDeep, getComparisonStream, getName, getRandom, getRandomSeed, randomInRange, randomInRange, randomIs, randomToLimit, reseed, setComparisonStream, setName, setRandom, setRandomSeed, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MoveRandomWithin()
public MoveRandomWithin(int x,
int y,
int width,
int height)
x - top boundary of the areay - left boundary of the areawidth - horizontal extent of areaheight - vertical extent of area| Method Detail |
|---|
public void setArea(int x,
int y,
int width,
int height)
x - top boundary of the areay - left boundary of the areawidth - horizontal extent of areaheight - vertical extent of areapublic void execute(Agent agent)
execute in class Ruleagent - the playing agentCellOccupant.moveTo(org.ascape.model.HostCell)public boolean isCauseRemoval()
isCauseRemoval in class Rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||