turtle.turnLeft

From ComputerCraft
Jump to: navigation, search

turtle.turnLeft
Function
Syntax
turtle.turnLeft()
Returns boolean success
API turtle
Source CC:Tweaked (source)

When called, tries to rotate the turtle 90 degrees to the left. Note that performing this action does not require fuel, and the turtle can not be obstructed or denied from rotating.

ExampleExampleRotating a turtle
Rotates a turtle 360 degrees counter-clockwise, which equals to 4 steps of 90 degrees to the left, to end facing in the same direction as it started.
Code
for step = 1, 4 do
  turtle.turnLeft()
end