public class BattleCompletedEvent extends BattleEvent
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 and Description |
---|
BattleCompletedEvent(BattleRules battleRules,
BattleResults[] results)
Creates a new BattleCompletedEvent.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.public BattleRules getBattleRules()
public BattleResults[] getSortedResults()
public BattleResults[] getIndexedResults()