|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--PersonAI
Class used to move a NPC around the Grid.
People,
Person,
Trainer,
Grid| Field Summary | |
protected static int |
los
How far to be able to see in the direction I am facing |
| Constructor Summary | |
PersonAI(Person p)
Tie this to a Person to control. |
|
| Method Summary | |
protected void |
move(int dir)
Move the Person in the direction specified. |
protected void |
moveMe()
Handle the actual Moving, based on a RNG |
void |
run()
Move this around the Grid, and sleep a random amount of time. |
void |
setGrid(Grid g)
Set the Grid, set to null to kill the thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int los
| Constructor Detail |
public PersonAI(Person p)
p - the Person to control| Method Detail |
protected void move(int dir)
throws NonEmptyException,
InvalidLocationException,
EmptyLocationException
dir - the Direction to move
NonEmptyException
InvalidLocationException
EmptyLocationExceptionprotected void moveMe()
public void setGrid(Grid g)
Gridpublic void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||