|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.repastdemos.sugarscape.SugarAgent
public class SugarAgent
The agent for the sugar scape simulation. This agent implements movement rule M, pg. 182, where best is defined by most sugar at the closest location.
The source is annotated so see that for more info.
| Constructor Summary | |
|---|---|
SugarAgent(SugarSpace ss,
SugarModel model)
|
|
| Method Summary | |
|---|---|
void |
draw(SimGraphics g)
Invoked when the object should draw itself |
int |
getCurrentAge()
|
int |
getMaxAge()
|
int |
getMetabolism()
|
int |
getSugar()
|
int |
getVision()
|
int |
getX()
Gets the x coordinate of this drawable. |
int |
getY()
Gets the y coordinate of the this drawable. |
void |
setMaxAge(int age)
|
void |
setMetabolism(int meta)
|
void |
setSugar(int sugar)
|
void |
setVision(int vis)
|
void |
setXY(int x,
int y)
|
void |
step()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SugarAgent(SugarSpace ss,
SugarModel model)
| Method Detail |
|---|
public void setXY(int x,
int y)
public int getX()
Drawable
getX in interface Drawablepublic int getY()
Drawable
getY in interface Drawablepublic void setMetabolism(int meta)
public void setVision(int vis)
public int getMetabolism()
public int getVision()
public void setSugar(int sugar)
public int getSugar()
public int getMaxAge()
public void setMaxAge(int age)
public int getCurrentAge()
public void step()
public void draw(SimGraphics g)
Drawable
draw in interface Drawable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||