Robot TurnGunLeft Method Robocode Robot API for .NET
Immediately turns the robot's gun to the left by degrees.

This call executes immediately, and does not return until it is complete, i.e. when the angle remaining in the gun's turn is 0.

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 right instead of left.

Examples

// Turn the robot's gun 180 degrees to the left
TurnGunLeft(180);

// Afterwards, turn the robot's gun 90 degrees to the right
TurnGunLeft(-90);

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

public void TurnGunLeft(
	double degrees
)

Parameters

degrees
Type: OnlineSystem Double
The amount of degrees to turn the robot's gun to the left. If degrees > 0 the robot's gun will turn left. If degrees < 0 the robot's gun will turn right. If degrees = 0 the robot's gun will not turn, but execute.
See Also