|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjrobots.simulation.simulationObjects.Pilot
jrobots.simulation.simulationObjects.JRobot2007
BogBot
public class BogBot
"Bog-standard Bot"
The BogBot
is a straightforwardly implemented Bot.
It can get quite dangerous, if underestimated.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jrobots.simulation.simulationObjects.Pilot |
---|
Pilot.DropperCommand, Pilot.LauncherAmmunition |
Field Summary |
---|
Fields inherited from class jrobots.simulation.simulationObjects.Pilot |
---|
DOWN, LEFT, memoryConsumption, RIGHT, UP |
Constructor Summary | |
---|---|
BogBot()
|
Method Summary | |
---|---|
protected void |
actions()
Everytime the simulation has progressed, each Pilot may
plan the next actions. |
protected void |
init()
Diese Methode wird einmalig aufgerufen, nachdem der Bot in die Arena gesetzt wird und bevor der Kampf startet. |
Methods inherited from class jrobots.simulation.simulationObjects.JRobot2007 |
---|
addDebugArrow, addDebugCrosshair, addDebugLine, addDebugLine, getHealth, getLastScanResult, getMaxArenaDiameter, getMaxBackwardVelocity, getMaxForwardVelocity, getMaxScanAperture, getOrientation, getPosition, getProjectileSpeed, getReloadTime, getScanInterval, getTimeOfLastScan, getTimeOfLastShot, getVelocity, isScanFromNow, setAutopilot, setBodyColor, setDebugLines, setDebugText, setDropMineCommand, setLaunchProjectileCommand, setNameColor, setScanAperture, setScanDirection, setTurretColor |
Methods inherited from class jrobots.simulation.simulationObjects.Pilot |
---|
clone, getBodyColor, getEnergy, getNameColor, getSafeShootDistance, getTime, getTurretColor |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BogBot()
Method Detail |
---|
protected void actions()
Pilot
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.
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.
actions
in class Pilot
protected void init()
Pilot
init
in class Pilot
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |