AdvancedRobot SetTurnGunRight Method Robocode Robot API for .NET
Sets the robot's gun to turn right by degrees when the next execution takes place.

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's gun is set to turn left instead of right.

Examples

// Set the gun to turn 180 degrees to the right
SetTurnGunRight(180);

// Set the gun to turn 90 degrees to the left instead of right 
// (overrides the previous order)
SetTurnGunRight(-90);

...
// Executes the last SetTurnGunRight()
Execute();

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

public void SetTurnGunRight(
	double degrees
)

Parameters

degrees
Type: OnlineSystem Double
The amount of degrees to turn the robot's gun to the right. If degrees > 0 the robot's gun is set to turn right. If degrees < 0 the robot's gun is set to turn left. If degrees = 0 the robot's gun is set to stop turning.
See Also