Robot Back Method Robocode Robot API for .NET
Immediately moves your robot backward by distance measured in pixels.

This call executes immediately, and does not return until it is complete, i.e. when the remaining distance to move is 0.

If the robot collides with a wall, the move is complete, meaning that the robot will not move any further. If the robot collides with another robot, the move is complete if you are heading toward the other robot.

Note that both positive and negative values can be given as input, where negative values means that the robot is set to move forward instead of backward.


// Move the robot 100 pixels backward

// Afterwards, move the robot 50 pixels forward

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

public void Back(
	double distance


Type: OnlineSystem Double
The distance to move back measured in pixels. If this value is negative, the robot will move ahead instead of back.
See Also