|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread wyvern.kernel.commands.AbstractAI wyvern.lib.ai.ShipAI
Implements the AI for sailing ships (e.g. pirate ships); needs work.
Field Summary |
Fields inherited from class wyvern.kernel.commands.AbstractAI |
commandables_, commandList_, queues_ |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Fields inherited from interface wyvern.lib.AI |
DEFAULT_MONSTER_INERTIA, DEFAULT_WANDER_RANGE |
Method Summary | |
static AI |
add(Commandable c)
Puts a commandable under this AI's control. |
int |
chooseDir()
Chooses a random direction (N, S, E or W) |
static AI |
getImpl()
Returns the implementation object. |
void |
think(Commandable m,
EventQueue q)
Decide what to do next. |
Methods inherited from class wyvern.kernel.commands.AbstractAI |
addCommandable, addToHateList, chooseRandomDir, getAverageTime, getCommand, getNumThinks, getProfilingInfo, getTotalTime, isControlling, moveRandomly, notifyAttacked, registerCommand, removeCommandable, requestEvent, run, serviceQueues, thinkForQueue, unregisterCommand |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static AI add(Commandable c)
c
- a commandable to add
public static AI getImpl()
public void think(Commandable m, EventQueue q)
think
in interface AI
think
in class AbstractAI
m
- the commandable to think forq
- the commandable's event queuepublic int chooseDir()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |