public final class BattleEndedEvent extends Event
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.BattleResults
,
Robot.onBattleEnded(BattleEndedEvent)
,
Serialized FormConstructor and Description |
---|
BattleEndedEvent(boolean aborted,
BattleResults results)
Called by the game to create a new BattleEndedEvent.
|
Modifier and Type | Method and Description |
---|---|
int |
getPriority()
Returns the priority of this event.
|
BattleResults |
getResults()
Returns the battle results.
|
boolean |
isAborted()
Checks if this battle was aborted.
|
compareTo, getTime, setPriority, setTime
public BattleEndedEvent(boolean aborted, BattleResults results)
aborted
- true
if the battle was aborted; false
otherwise.results
- the battle resultspublic boolean isAborted()
true
if the battle was aborted; false
otherwise.public BattleResults getResults()
public final int getPriority()
An event priority is a value from 0 - 99. The higher value, the higher priority.
The default priority is 80, but varies depending on the type of event.
getPriority
in class Event
Copyright © 2021 Robocode. All Rights Reserved.