robocode.control.events

Class BattleFinishedEvent


public class BattleFinishedEvent
extends BattleEvent

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.
Authors:
Pavel Savara (original)
Flemming N. Larsen (contributor)
Since:
1.6.2
See Also:
IBattleListener, BattleStartedEvent, BattleCompletedEvent

Constructor Summary

BattleFinishedEvent(boolean isAborted)
Creates a new BattleFinishedEvent.

Method Summary

boolean
isAborted()
Checks if the battle was aborted.

Constructor Details

BattleFinishedEvent

public BattleFinishedEvent(boolean isAborted)
Creates a new BattleFinishedEvent.
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.