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.
|Constructor and Description|
Called by the game to create a new BattleCompletedEvent.
|Modifier and Type||Method and Description|
Returns the rules used in the battle.
Returns the battle results that can be used to determine the score for the individual robot based on the robot index.
Returns the battle results sorted on score.
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()
Copyright © 2017 Robocode. All Rights Reserved.