RateControlRobot TurnRateRadians Property Robocode Robot API for .NET
The robot's clockwise (right) rotation per turn, in radians.

This call returns immediately, and will not execute until you call Execute() or take an action that executes.

Note that both positive and negative values can be given as input, where negative values means that the robot turns counterclockwise (left)


// Set the robot to turn right pi / 32 radians per turn
TurnRateRadians = Math.PI / 32;

// Set the robot to turn left pi / 20 radians per turn 
// (overrides the previous order)
TurnRateRadians = -Math.PI / 20;

// Executes the last TurnRateRadians

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

public double TurnRateRadians { get; set; }

Property Value

Type: OnlineDouble
See Also

RateControlRobot TurnRateRadians