|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.Event
robocode.BattleEndedEvent
public final class BattleEndedEvent
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.
BattleResults
,
Robot.onBattleEnded(BattleEndedEvent)
,
Serialized FormConstructor Summary | |
---|---|
BattleEndedEvent(boolean aborted,
BattleResults results)
Called by the game to create a new BattleEndedEvent. |
Method Summary | |
---|---|
int |
getPriority()
Returns the priority of this event. |
BattleResults |
getResults()
Returns the battle results. |
boolean |
isAborted()
Checks if this battle was aborted. |
Methods inherited from class robocode.Event |
---|
compareTo, getTime, setPriority, setTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BattleEndedEvent(boolean aborted, BattleResults results)
aborted
- true
if the battle was aborted; false
otherwise.results
- the battle resultsMethod Detail |
---|
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |