public class EnsignDuck
extends jrobots.simulation.simulationObjects.JRobot2011
Tactics:
Derived from Rocketeer
Pilot.DropperCommand, Pilot.LauncherAmmunition
Constructor and Description |
---|
EnsignDuck() |
Modifier and Type | Method and Description |
---|---|
protected void |
actions()
Everytime the simulation has progressed, each
Pilot may plan
the next actions. |
protected void |
init()
This method is called once if the bot is set into the arena and whenever the pilot needs to be reset.
|
addDebugArrow, addDebugCrosshair, addDebugLine, addDebugLine, getEnergyConsumptionBooster, getEnergyConsumptionEngine, getEnergyConsumptionMine, getEnergyConsumptionProjectile, getEnergyConsumptionRocket, getEnergyConsumptionRocketRedirection, getEnergyConsumptionScanner, getEnergyConsumptionTrap, getEnergyProduction, getFramesPerSecond, getLastScan, getMaxArenaDiameter, getMaxBackwardVelocity, getMaxForwardVelocity, getMaxScanAperture, getMaxVelocityProjectile, getMaxVelocityRocket, getOrientation, getPosition, getProjectileSpeed, getProximityScanDroppable, getProximityScanLaunchable, getRocketPosition, getVelocity, isScanFromNow, setAutopilot, setBodyColor, setBoost, setDebugLines, setDebugText, setDropMineCommand, setDropTankTrapCommand, setLaunchProjectileCommand, setLaunchRocketCommand, setNameColor, setRocketHeading, setScanAperture, setScanDirection, setTurretColor
getBodyColor, getEnergy, getHealth, getName, getNameColor, getTime, getTurretColor
protected void actions()
jrobots.simulation.simulationObjects.JRobot2011
Pilot
may plan
the next actions. This is done through execution of this method.
Knowledge a Pilot
has of the momentary simulation state is
limited to what its Panzer
's sensors may display. Access to
the Panzer's sensor states is best done via the following methods:
getPosition
, getOrientation
,
getVelocity
, getTime
getLastScanResult
, isScanFromNow
,
isScannerUpdated
, getTimeOfLastScan
,
getScanInterval
getTimeOfLastShot
,
getProjectileSpeed
A Pilot
is able to steer its Panzer
. The Panzer
will follow those decisions until the Pilot canges its commands.
Decisions are made by calling the following routines:
setAutopilot
, setTrackspeedLeft
,
setTrackspeedRight
setScanDirection
, setScanAperture
setCannonCommand
setDebugText
, setDebugLines
You may add fields as you like to keep some state through the coarse of
the simulation run. But remember not to waste memory, as the framework
checks the size of your Pilot
's state and may refuse to
permit it to the arena.
You can always use static fields, but that makes the timeline
slider obsolete for debugging.
Also keep track of the computing time you spend, because if you exeed a
certain treshold, the framework may exert punishment upon your Pilot. If
you try to not waste time, there shouldn't be a problem, however.
If your Pilot causes an exception, there will also be some detriment, but
a new instance of your Pilot will be established, so you may be able to
carry on.
Package visibility. Pilots with a partial programming interface may want to have an invisible partial implementation of actions().
actions
in class jrobots.simulation.simulationObjects.JRobot2011