Package robocode

Class RobotDeathEvent

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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 Detail

      • RobotDeathEvent

        public RobotDeathEvent​(java.lang.String robotName)
        Called by the game to create a new RobotDeathEvent.
        Parameters:
        robotName - the name of the robot that died
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the robot that died.
        Returns:
        the name of the robot that died
      • getRobotName

        @Deprecated
        public java.lang.String getRobotName()
        Deprecated.
        Use getName() instead.
        Returns:
        the name of the robot that died