BotLabBotLab

Code Editor - Type Your Own Code

Robot Simulator

Available Commands

robot.forward(distance)

Move the robot forward by the specified distance

robot.backward(distance)

Move the robot backward by the specified distance

robot.turn(degrees)

Turn the robot by the specified degrees (positive = right)

robot.penDown()

Lower the pen to start drawing

robot.penUp()

Raise the pen to stop drawing

robot.setColor(color)

Set the drawing color (e.g., '#8b5cf6' or 'red')