sampleai
Class Unit
java.lang.Object
j4cevo.MemoryBasedObject
j4cevo.CevoIndexedObject
j4cevo.Unit
sampleai.Unit
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, UnitBase
- public class Unit
- extends Unit
ported from StdAI.dpr
- See Also:
- Serialized Form
|
Nested Class Summary |
static class |
Unit.Information
Demonstrates saving of Information for a j4cEvo managed Object (a unit)
The information itself is rather useless at the moment. |
static class |
Unit.UnitCommand
Demonstrates further refining Information for objects derived from j4cEvo
managed objects. |
|
Constructor Summary |
Unit()
|
| Methods inherited from class j4cevo.Unit |
fromData, getAirload, getFlags, getFuel, getHealth, getHome, getJob, getLevel, getLocation, getMaster, getMicroExperience, getModel, getModelBase, getMoveAdvice, getMoveAdvice, getMovementPointsLeft, getOwner, getPlayerBase, getStatus, getTroopload, identification, isAliveAdditional, load, log, move, move, readExternal, readResolve, remove, representation, setHome, setStatus, startJob, stay, testMove, toString, unload |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.io.Externalizable |
writeExternal |
Unit
public Unit()
getCommandString
public java.lang.String getCommandString()
getPathTo
public PathFinder.Path getPathTo(int dest,
int maxDistance)
attackEnemyOrConquer
public boolean attackEnemyOrConquer()
checkGuardCity
public void checkGuardCity()
doAttack
public int doAttack(int moveX,
int moveY,
Tile destination)
nearestCity
public CityBase nearestCity(boolean enemy)
generated: 20050107