sampleai
Class Unit

java.lang.Object
  extended byj4cevo.MemoryBasedObject
      extended byj4cevo.CevoIndexedObject
          extended byj4cevo.Unit
              extended bysampleai.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.
 
Nested classes inherited from class j4cevo.Unit
Unit.MoveAdvice
 
Field Summary
 
Fields inherited from class j4cevo.Unit
ExperiencRequiredForLevel
 
Constructor Summary
Unit()
           
 
Method Summary
 boolean attackEnemyOrConquer()
           
 void checkGuardCity()
           
 int doAttack(int moveX, int moveY, Tile destination)
           
 java.lang.String getCommandString()
           
 PathFinder.Path getPathTo(int dest, int maxDistance)
           
 CityBase nearestCity(boolean enemy)
           
 
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 j4cevo.CevoIndexedObject
bufferChanged, bufferChangedAndValidated, bufferLoaded, bufferLoadedAndKeyGenerated, getIndex, getKey, getPlayer, isAlive, writeExternal, writeTo
 
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
 
Methods inherited from interface j4cevo.UnitBase
isAlive
 

Constructor Detail

Unit

public Unit()
Method Detail

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