Package robocode

Class RoundEndedEvent

java.lang.Object
robocode.Event
robocode.RoundEndedEvent
All Implemented Interfaces:
Serializable, Comparable<Event>

public final class RoundEndedEvent extends Event
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.
Since:
1.7.2
Author:
Flemming N. Larsen (original)
See Also:
  • Constructor Details

    • 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 Details

    • 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 class Event
      Returns:
      the priority of this event.