Everytime the simulation has progressed, each 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:
- Moving:
getPosition
, getOrientation
,
getVelocity
, getTime
- Scanning:
getLastScanResult
, isScanFromNow
,
isScannerUpdated
,
getTimeOfLastScan
, getScanInterval
- Shooting:
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:
- Driving:
setAutopilot
, setTrackspeedLeft
,
setTrackspeedRight
- Scanning:
setScanDirection
, setScanAperture
- Shooting:
setCannonCommand
- Debug:
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.
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.
- Specified by:
actions
in class Pilot