IAdvancedRobotPeer SetInterruptible Method Robocode Robot API for .NET
Call this during an event handler to allow new events of the same priority to restart the event handler.

Examples

public void OnScannedRobot(ScannedRobotEvent e)
{
    Fire(1);
    SetInterruptible(true);
    Move(100);  // If you see a robot while moving ahead, 
                // this handler will start from the top 
                // Without SetInterruptible(true), we wouldn't 
                // receive scan events at all! 
    // We'll only get here if we don't see a robot during the move.
    Out().WriteLine("Ok, I can't see anyone");
}

Namespace: Robocode.RobotInterfaces.Peer
Assembly: robocode (in robocode.dll) Version: 1.9.2.0
Syntax

void SetInterruptible(
	bool interruptible
)

Parameters

interruptible
Type: OnlineSystem Boolean
true if the event handler should be interrupted if new events of the same priority occurs; false otherwise
See Also