Robot Scan Method Robocode Robot API for .NET
Scans for other robots. This method is called automatically by the game, as long as the robot is moving, turning its body, turning its gun, or turning its radar.

Scan will cause OnScannedRobot(ScannedRobotEvent) to be called if you see a robot.

There are 2 reasons to call Scan  manually:
  1. You want to scan after you stop moving.
  2. You want to interrupt the OnScannedRobot(ScannedRobotEvent) event. This is more likely. If you are in OnScannedRobot(ScannedRobotEvent) and call Scan , and you still see a robot, then the system will interrupt your OnScannedRobot(ScannedRobotEvent) event immediately and start it from the top.

This call executes immediately.

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

public void Scan()
See Also