Package robocode
Class RoundEndedEvent
- java.lang.Object
-
- robocode.Event
-
- robocode.RoundEndedEvent
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Event>
public final class RoundEndedEvent extends Event
A RoundEndedEvent is sent toonRoundEnded()
when a round has ended. You can use the information contained in this event to determine which round that has ended.- Since:
- 1.7.2
- Author:
- Flemming N. Larsen (original)
- See Also:
Robot.onRoundEnded(RoundEndedEvent)
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RoundEndedEvent(int round, int turns, int totalTurns)
Called by the game to create a new RoundEndedEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
RoundEndedEvent
public RoundEndedEvent(int round, int turns, int totalTurns)
Called by the game to create a new RoundEndedEvent.- Parameters:
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
-
getRound
public int getRound()
Returns the round that ended (zero-indexed).- Returns:
- the round that ended (zero-indexed).
-
getTurns
public int getTurns()
Returns the number of turns that this round reached.- Returns:
- the number of turns that this round reached.
-
getTotalTurns
public int getTotalTurns()
Returns the total number of turns reached in the battle when this round ended.- Returns:
- the total number of turns reached in the battle when this round ended.
-
getPriority
public final int getPriority()
Returns the priority of this event.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.
- Overrides:
getPriority
in classEvent
- Returns:
- the priority of this event.
-
-