|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.control.events.BattleEvent
robocode.control.events.BattleCompletedEvent
public class BattleCompletedEvent
A BattleCompletedEvent is sent to onBattleCompleted()
when the battle is completed successfully and results are available. This event
will not occur if the battle is terminated or aborted by the user before the battle is completed.
IBattleListener
,
BattleStartedEvent
,
BattleFinishedEvent
Constructor Summary | |
---|---|
BattleCompletedEvent(BattleRules battleRules,
BattleResults[] results)
Creates a new BattleCompletedEvent. |
Method Summary | |
---|---|
BattleRules |
getBattleRules()
Returns the rules that was used in the battle. |
BattleResults[] |
getIndexedResults()
Returns the unsorted battle results so that robot indexes can be used. |
BattleResults[] |
getSortedResults()
Returns the battle results sorted on score, meaning that robot indexes cannot be used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BattleCompletedEvent(BattleRules battleRules, BattleResults[] results)
battleRules
- the rules that was used in the battle.results
- the indexed results of the battle. These are unsorted, but using robot indexes.Method Detail |
---|
public BattleRules getBattleRules()
public BattleResults[] getSortedResults()
public BattleResults[] getIndexedResults()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |