## robocode
Class HitWallEvent

    java.lang.Object
      robocode.Event
          robocode.HitWallEvent

All Implemented Interfaces:
  Comparable

public class HitWallEvent
extends Event

A HitWallEvent is sent to `Robot.onHitWall(robocode.HitWallEvent)` when you collide a wall. You can use the information contained in this event to determine what to do.

Constructor Summary
`HitWallEvent(double bearing)` Called by the game to create a new HitWallEvent.

Method Summary
`double` `getBearing()` Returns the angle to the wall you hit, relative to your robot's heading.
`double` `getBearingDegrees()` Deprecated. use getBearing
`double` `getBearingRadians()` Returns the angle to the wall you hit in radians, relative to your robot's heading.

Methods inherited from class robocode.Event
`compareTo, getPriority, getTime, setPriority, setTime`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HitWallEvent

    public HitWallEvent(double bearing)

  Called by the game to create a new HitWallEvent.

Method Detail

### getBearing

    public double getBearing()

  Returns the angle to the wall you hit, relative to your robot's heading. -180 <= getBearing() < 180

  Returns:
    the angle to the wall you hit, in degrees

### getBearingDegrees

    public double getBearingDegrees()

  Deprecated. use getBearing

### getBearingRadians

    public double getBearingRadians()

  Returns the angle to the wall you hit in radians, relative to your robot's heading. -PI <= getBearing() < PI

  Returns:
    the angle to the wall you hit, in radians