java.lang.Objectjrobots.simulation.simulationObjects.AbstractPilot
jrobots.simulation.simulationObjects.Pilot
jrobots.simulation.simulationObjects.JRobot2016A
RacerFollower
public class RacerFollower
Aims for the silver price.
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, RIGHT, UP |
Fields inherited from class jrobots.simulation.simulationObjects.AbstractPilot |
---|
memoryConsumption |
Constructor Summary | |
---|---|
RacerFollower()
|
Method Summary | |
---|---|
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. |
Methods inherited from class jrobots.simulation.simulationObjects.JRobot2016A |
---|
addDebugArrow, addDebugCrosshair, addDebugLine, addDebugLine, down, getBodyFactory, getCurrentTerrain, getEnergyConsumptionEngine, getEnergyProductionPerSecond, getFramesPerSecond, getMaxBackwardVelocity, getMaxForwardVelocity, getOrientation, getPosition, getPosOfBestBot, getVelocity, left, right, setAutopilot, setBodyColor, setBoost, setDebugLines, setNameColor, up |
Methods inherited from class jrobots.simulation.simulationObjects.Pilot |
---|
getBodyColor, getEnergy, getHealth, getName, getNameColor, getTime, getTurretColor |
Methods inherited from class jrobots.simulation.simulationObjects.AbstractPilot |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RacerFollower()
Method Detail |
---|
protected void actions()
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 JRobot2016A
protected void init()
Pilot
Please remember: If you overwrite this routine, call super.init().
init
in class Pilot