Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## robocode
Class HitWallEvent

    java.lang.Object
      robocode.Event
          robocode.HitWallEvent

All Implemented Interfaces:
  Serializable, Comparable

    public final class HitWallEvent

extends Event

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

Author:
  Mathew A. Nelson (original)
See Also:
  Serialized Form

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

Method Summary
`double` | `getBearing()` Returns the bearing to the wall you hit, relative to your robot's heading, in degrees (-180 <= getBearing() < 180)
`double` | `getBearingDegrees()` Deprecated. Use `HitWallEvent.getBearing()` instead.
`double` | `getBearingRadians()` Returns the bearing to the wall you hit, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI)

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

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

Constructor Detail

### HitWallEvent

    public HitWallEvent(double bearing)

  Called by the game to create a new HitWallEvent.

  Parameters:
    `bearing` - the bearing to the wall that your robot hit, in radians

Method Detail

### getBearing

    public double getBearing()

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

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

### getBearingDegrees

    @Deprecated
    public double getBearingDegrees()

  Deprecated. Use `HitWallEvent.getBearing()` instead.

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

### getBearingRadians

    public double getBearingRadians()

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

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Robocode. All Rights Reserved.