Package robocode

Class TurnCompleteCondition


  • public class TurnCompleteCondition
    extends Condition
    A prebuilt condition you can use that indicates your robot has finished turning.
    Author:
    Mathew A. Nelson (original), Flemming N. Larsen (contributor), Nathaniel Troutman (contributor)
    See Also:
    Condition
    • Constructor Detail

      • TurnCompleteCondition

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

        public TurnCompleteCondition​(AdvancedRobot robot,
                                     int priority)
        Creates a new TurnCompleteCondition 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
        See Also:
        Condition.setPriority(int)
    • Method Detail

      • test

        public boolean test()
        Tests if the robot has finished turning.
        Specified by:
        test in class Condition
        Returns:
        true if the robot has stopped turning; false otherwise
      • cleanup

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