## Class SimpleSonarBot

    java.lang.Object
      jrobots.simulation.simulationObjects.AbstractPilot
          jrobots.simulation.simulationObjects.Pilot
              jrobots.simulation.simulationObjects.JRobot2015
                  SimpleSonarBot

All Implemented Interfaces:
  java.io.Serializable

    public class SimpleSonarBot

extends JRobot2015

Test bot for the echolocation device.

See Also:
  Serialized Form

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
`SimpleSonarBot()`

Method Summary
`protected void` | `actions()` At every simulation cycle every JRobot plans its next actions.

Methods inherited from class jrobots.simulation.simulationObjects.JRobot2015
`addDebugArrow, addDebugCrosshair, addDebugLine, getEnergyConsumptionBooster, getEnergyConsumptionEngine, getEnergyConsumptionGrenade, getEnergyConsumptionSonarForMeterStdDev, getEnergyProductionPerFrame, getFramesPerSecond, getGrenadeDamageMax, getGrenadeDamageRadius, getGrenadeSpeed, getGrenadeTriggerRadius, getJRobotLength, getLastSonarTrace, getMaxArenaDiameter, getMaxBackwardVelocity, getMaxForwardVelocity, getOrientation, getPosition, getProximityScan, getProximityScannerGroundRange, getProximityScannerProjectileRange, getVelocity, setAutopilot, setBodyColor, setBoost, setLaunchProjectileCommand, setNameColor, setSonarEnergy, setTurretColor`

Methods inherited from class jrobots.simulation.simulationObjects.Pilot
`getBodyColor, getEnergy, getHealth, getName, getNameColor, getTime, getTurretColor, init`

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

### SimpleSonarBot

    public SimpleSonarBot()

Method Detail

### actions

    protected void actions()

  Description copied from class: `JRobot2015`
  At every simulation cycle every JRobot plans its next actions. This happens by the framework calling this method.
  Every participant is programming the decisions the JRobot will take in any possible situation. The following allotment of methods will help you in doing so.

  Every JRobot has only limited knowledge of its surroundings. That limit is set by its sensors. Sensors in general are methods starting with `get...`:

  - Common: `Pilot.getTime()`, `Pilot.getEnergy()`, `JRobot2015.getEnergyProductionPerFrame()`
  - Movement: `JRobot2015.getPosition()`, `JRobot2015.getOrientation()`, `JRobot2015.getVelocity()`, `JRobot2015.getEnergyConsumptionEngine()`,
  - Scanner: `Pilot.getLastScan()`, `#isScanFromNow()`, `Pilot.getScanAperture()`, `JRobot2015.getProximityScan()` `JRobot2015.getProximityScannerProjectileRange()`, `JRobot2015.getProximityScannerGroundRange()` `JRobot2015.getEnergyConsumptionSonarForMeterStdDev()`
  - Launcher: `JRobot2015.getGrenadeSpeed()`, `JRobot2015.getEnergyConsumptionGrenade()`

  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...`:

  - Scanner: `JRobot2015.setSonarEnergy(double)`,
  - Launcher: `JRobot2015.setLaunchProjectileCommand(Angle, double)`
  - Movement: `JRobot2015.setAutopilot(Angle, double)`, `JRobot2015.setBoost()`
  - Debug: `JRobot2015.addDebugArrow(Vector, Vector)`, `JRobot2015.addDebugCrosshair(Vector)`, `JRobot2015.addDebugLine(Vector, Vector)`
  - Style: `JRobot2015.setBodyColor(Color)`, `JRobot2015.setTurretColor(Color)`, `JRobot2015.setNameColor(Color)`

  In package `jrobots.utils` there are several helper classes to be used as necessary.

  - `Vector`
  - `Angle`
  - `SonarTrace`
  - `ProximityScan`
  - `LinearPredictor`

  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.

  Specified by:
    `actions` in class `JRobot2015`