robocode
Class MineHitEvent

java.lang.Object
  extended by robocode.Event
      extended by robocode.MineHitEvent
All Implemented Interfaces:
Serializable, Comparable<Event>

public class MineHitEvent
extends Event

This event is sent to onMineHit when one of your mines has hit a Ship.

Author:
Thales B.V. / Thomas Hakkers (original) Figured I'd add you in the credits, since most of it is copied from BulletHitEvent, Mathew A. Nelson (contributor), Flemming N. Larsen (contributor)
See Also:
Serialized Form

Constructor Summary
MineHitEvent(String name, double energy, Mine mine)
          Called by the game to create a new MineHitEvent.
 
Method Summary
 double getEnergy()
          Returns the remaining energy of the ship your mine has hit (after the damage done by your mine).
 Mine getMine()
          Returns the mine of yours that hit the ship.
 String getName()
          Returns the name of the ship your mine hit.
 
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

MineHitEvent

public MineHitEvent(String name,
                    double energy,
                    Mine mine)
Called by the game to create a new MineHitEvent.

Parameters:
name - the name of the ship your mine hit
energy - the remaining energy of the robot that your bullet has hit
mine - the mine that hit the robot
Method Detail

getMine

public Mine getMine()
Returns the mine of yours that hit the ship.

Returns:
the mine that hit the ship

getEnergy

public double getEnergy()
Returns the remaining energy of the ship your mine has hit (after the damage done by your mine).

Returns:
energy the remaining energy of the ship that your mine has hit

getName

public String getName()
Returns the name of the ship your mine hit.

Returns:
the name of the ship your mine hit.


Copyright © 2015 Robocode. All Rights Reserved.