|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.Event
robocode.RoundEndedEvent
public final class RoundEndedEvent
A RoundEndedEvent is sent to onRoundEnded()
when a round has ended.
You can use the information contained in this event to determine which round that has ended.
Robot.onRoundEnded(RoundEndedEvent)
,
Serialized FormConstructor Summary | |
---|---|
RoundEndedEvent(int round,
int turns,
int totalTurns)
Called by the game to create a new RoundEndedEvent. |
Method Summary | |
---|---|
int |
getPriority()
Returns the priority of this event. |
int |
getRound()
Returns the round that ended (zero-indexed). |
int |
getTotalTurns()
Returns the total number of turns reached in the battle when this round ended. |
int |
getTurns()
Returns the number of turns that this round reached. |
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 RoundEndedEvent(int round, int turns, int totalTurns)
round
- the round that has ended (zero-indexed).turns
- the number of turns that this round reached.totalTurns
- the total number of turns reached in the battle when this round ended.Method Detail |
---|
public int getRound()
public int getTurns()
public int getTotalTurns()
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 |