robocode

Class RadarTurnCompleteCondition


public class RadarTurnCompleteCondition
extends Condition

A prebuilt condition you can use that indicates your radar has finished turning.
Authors:
Mathew A. Nelson (original)
Flemming N. Larsen (contributor)
Nathaniel Troutman (contributor)
See Also:
Condition

Field Summary

Fields inherited from class robocode.Condition

name, priority

Constructor Summary

RadarTurnCompleteCondition(AdvancedRobot robot)
Creates a new RadarTurnCompleteCondition with default priority.
RadarTurnCompleteCondition(AdvancedRobot robot, int priority)
Creates a new RadarTurnCompleteCondition with the specified priority.

Method Summary

@Override
boolean test()
Tests if the radar has stopped turning.
@Override
void cleanup()
Called by the system in order to clean up references to internal objects.

Methods inherited from class robocode.Condition

cleanup, getName, getPriority, setName, setPriority, test

Constructor Details

RadarTurnCompleteCondition

public RadarTurnCompleteCondition(AdvancedRobot robot)
Creates a new RadarTurnCompleteCondition with default priority. The default priority is 80.
Parameters:
robot - your robot, which must be a AdvancedRobot

RadarTurnCompleteCondition

public RadarTurnCompleteCondition(AdvancedRobot robot,
                                  int priority)
Creates a new RadarTurnCompleteCondition with the specified priority. A condition priority is a value from 0 - 99. The higher value, the higher priority. The default priority is 80.
Parameters:
robot - your robot, which must be a AdvancedRobot
priority - the priority of this condition

Method Details

boolean test

public @Override boolean test()
Tests if the radar has stopped turning.
Returns:
true if the radar has stopped turning; false otherwise

void cleanup

public @Override void cleanup()
Called by the system in order to clean up references to internal objects.
Since:
1.4.3