ScannedRobotEvent CompareTo Method Robocode Robot API for .NET
Compares this event to another event regarding precedence.

The event precedence is first and foremost determined by the event time, secondly the event priority, and lastly specific event information.

This method will first compare the time of each event. If the event time is the same for both events, then this method compared the priority of each event. If the event priorities are equals, then this method will compare the two events based on specific event information.

This method is called by the game in order to sort the event queue of a robot to make sure the events are listed in chronological order.

Namespace: Robocode
Assembly: robocode (in robocode.dll) Version: 1.9.3.0
Syntax

public override sealed int CompareTo(
	Event evnt
)

Return Value

Type: OnlineInt32
Returns a negative value if this event has higher precedence, i.e. must be listed before the specified event. A positive value if this event has a lower precedence, i.e. must be listed after the specified event. 0 means that the precedence of the two events are equal.

Implements

OnlineIComparable T  CompareTo(T)
See Also