Package robocode

# Class RobotDeathEvent

java.lang.Object
robocode.Event
robocode.RobotDeathEvent

All Implemented Interfaces:
  `Serializable`, `Comparable<Event>`

public final class RobotDeathEvent extends Event
This event is sent to `onRobotDeath()` when another robot (not your robot) dies.

Author:
  Mathew A. Nelson (original), Flemming N. Larsen (contributor)
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`RobotDeathEvent(String robotName)`
Called by the game to create a new RobotDeathEvent.

## Method Summary

Modifier and Type
Method
Description
`String`
`getName()`
Returns the name of the robot that died.
`String`
`getRobotName()`
Deprecated.
Use `getName()` instead.

### 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 Details

### RobotDeathEvent

public RobotDeathEvent(String robotName)
Called by the game to create a new RobotDeathEvent.

Parameters:
  `robotName` - the name of the robot that died

## Method Details

### getName

public String getName()
Returns the name of the robot that died.

Returns:
  the name of the robot that died

### getRobotName

@Deprecated public String getRobotName()
Deprecated.
Use `getName()` instead.

Returns:
  the name of the robot that died