RateControlRobot VelocityRate Property Robocode Robot API for .NET
The speed the robot will move (forward), in pixels per turn.

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 will move backwards

Examples

// Set the robot to move forward 2 pixels per turn
VelocityRate = 2;

// Set the robot to move backwards 8 pixels per turn 
// (overrides the previous order)
VelocityRate = -8;

...
// Executes the last VelocityRate
Execute();
Note: This method overrules SetAhead(Double) and SetBack(Double)

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

public double VelocityRate { get; set; }

Property Value

Type: OnlineDouble
See Also

RateControlRobot VelocityRate