|
|||||||||
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
,
IBattleListener.onBattleCompleted(BattleCompletedEvent)
,
BattleStartedEvent
,
BattleFinishedEvent
Constructor Summary | |
---|---|
BattleCompletedEvent(BattleRules battleRules,
BattleResults[] results)
Called by the game to create a new BattleCompletedEvent. |
Method Summary | |
---|---|
BattleRules |
getBattleRules()
Returns the rules used in the battle. |
BattleResults[] |
getIndexedResults()
Returns the battle results that can be used to determine the score for the individual robot based on the robot index. |
BattleResults[] |
getSortedResults()
Returns the battle results sorted on score. |
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()
getIndexedResults()
public BattleResults[] getIndexedResults()
getSortedResults()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |