while true do
if(turtle.detect()) then
turtle.dig()
else turtle.forward()
end
end
