Anyways
I am codeing a turtle to solve a maze, its VERY basic at the moment, but my problem is follows:
My turtle will check the directions, but will not move in any direction at all.
Code:
function checkroute() Foward = turtle.detect() turtle.turnLeft() Left = turtle.detect() turtle.turnRight() turtle.turnRight() Right = turtle.detect() turtle.turnLeft() end function whichway() if Left == true and Right == true and Foward == true then decision = math.random(1, 3) if decision == 1 then turtle.turnLeft() turtle.foward() end if decision == 2 then turtle.foward() end if decision == 3 then turtle.turnRight() turtle.foward() end end if Left == false and Right == true and Foward == true then decision = math.random(1, 2) if decision == 1 then turtle.turnRight() turtle.foward() end if decision == 2 then turtle.foward() end end end term.clear() term.setCursorPos(1,1) print("MazeOS") checkroute() whichway()