Package robocode.control.events
Class BattleFinishedEvent
java.lang.Object
robocode.control.events.BattleEvent
robocode.control.events.BattleFinishedEvent
A BattleFinishedEvent is sent to
onBattleFinished()
when the battle is finished. This event is always sent as the last battle event,
both when the battle is completed successfully, terminated due to an error, or aborted by the user.
Hence, this events is well-suited for cleanup after the battle.- Since:
- 1.6.2
- Author:
- Pavel Savara (original), Flemming N. Larsen (contributor)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBattleFinishedEvent
(boolean isAborted) Called by the game to create a new BattleFinishedEvent. -
Method Summary
-
Constructor Details
-
BattleFinishedEvent
public BattleFinishedEvent(boolean isAborted) Called by the game to create a new BattleFinishedEvent. Please don't use this constructor as it might change.- Parameters:
isAborted
- a flag specifying if the battle was aborted:true
if the battle was aborted;false
otherwise.
-
-
Method Details
-
isAborted
public boolean isAborted()Checks if the battle was aborted.- Returns:
true
if the battle was aborted;false
otherwise.
-