robocode
Class BattleEndedEvent
java.lang.Object
robocode.Event
robocode.BattleEndedEvent
- All Implemented Interfaces:
- Comparable<Event>
public class BattleEndedEvent
- extends Event
A BattleEndedEvent is sent to onBattleEnded()
when the battle is ended.
You can use the information contained in this event to determine if the
battle was aborted and also get the results of the battle.
- Since:
- 1.6.1
- Author:
- Pavel Savara (original)
- See Also:
BattleResults
,
Robot.onBattleEnded(BattleEndedEvent)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BattleEndedEvent
public BattleEndedEvent(boolean aborted,
BattleResults results)
- Called by the game to create a new BattleEndedEvent.
- Parameters:
aborted
- true
if the battle was aborted; false
otherwise.results
- the battle results
isAborted
public boolean isAborted()
- Checks if this battle was aborted.
- Returns:
true
if the battle was aborted; false
otherwise.
getResults
public BattleResults getResults()
- Returns the battle results.
- Returns:
- the battle results.