i=0;
while true do
if i<10 then
turtle.dig();
turtle.forward();
turtle.digUp();
i=i+1;
end
if i==10 then
turtle.turnLeft();
turtle.turnLeft();
break
end
end
inv=0;
while inv<9 do
testpath=turtle.detect();
if testpath==true then
sleep(1);
redstone.setOutput("left",true);
sleep(1);
redstone.setOutput("left",false);
inv=inv+1;
end
if testpath==false then
turtle.forward();
end
end
turtle.turnLeft();
turtle.turnLeft();
while true do
blocktst=turtle.detect();
if blocktst==false then
turtle.forward();
end
if blocktst==true then
os.reboot();
end
end
