public class RacerTerrainScanner
extends jrobots.simulation.simulationObjects.JRobot2016A
Pilot.DropperCommand, Pilot.LauncherAmmunition
Constructor and Description |
---|
RacerTerrainScanner() |
Modifier and Type | Method and Description |
---|---|
protected void |
actions()
At every simulation cycle every JRobot plans its 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, down, getBodyFactory, getCurrentTerrain, getEnergyConsumptionEngine, getEnergyProductionPerSecond, getFramesPerSecond, getMaxBackwardVelocity, getMaxForwardVelocity, getOrientation, getPosition, getPosOfBestBot, getVelocity, left, right, setAutopilot, setBodyColor, setBoost, setDebugLines, setNameColor, up
getBodyColor, getEnergy, getHealth, getIsMovingInWrongDirection, getName, getNameColor, getTime, getTurretColor
protected void actions()
jrobots.simulation.simulationObjects.JRobot2016A
Every JRobot has only limited knowledge of its surroundings. That limit is set by its sensors. Sensors in general are methods starting with get...:
Pilot.getTime()
,
JRobot2016A.getEnergyProductionPerSecond()
JRobot2016A.getPosition()
, JRobot2016A.getOrientation()
,
JRobot2016A.getVelocity()
, JRobot2016A.getEnergyConsumptionEngine()
,
JRobot2016A.getCurrentTerrain()
, JRobot2016A.getPosOfBestBot()
The JRobot is called for actions, which are will have effect in the next simulation cycle. Issued actions in general are methods starting with set...:
JRobot2016A.setAutopilot(Angle, double)
,
JRobot2016A.setBoost()
JRobot2016A.addDebugArrow(Vector, Vector)
,
JRobot2016A.addDebugCrosshair(Vector)
, JRobot2016A.addDebugLine(Vector, Vector)
JRobot2016A.setBodyColor(Color)
,
JRobot2016A.setNameColor(Color)
In package jrobots.utils there are several helper classes to be used as necessary.
You may want to add fields to your JRobot class.
While it is possible to use static fields, these are not affected by the timeline slider in the GUI, which makes debugging less practical. Please don't use static fields while you can avoid it.
Runtime and memory are watched by the framework. If a reasonable use of the framework is confined by
your programming, the responsible JRobot may be expelled from the competition.
Exceptions will be caught by the framework and the JRobot will be restarted.
Please be aware of exceptions on the console, as the robot loses its memory at every restart.
actions
in class jrobots.simulation.simulationObjects.JRobot2016A