local t = turtle print("Length: ") local LENGTH = tonumber(read()) print("Width: ") local WIDTH = tonumber(read()) print("Height: ") local HEIGHT = tonumber(read()) --------------------------- local function detectedDig() while t.detect() == true do t.detect() t.dig() end end --------------------------- for n=1,HEIGHT do for i=1,WIDTH do for j=2,LENGTH do detectedDig() ---- t.forward() end if WIDTH%2 ~= 0 then if i+1<=WIDTH then if i%2 == 0 then t.turnLeft() detectedDig() ---- t.forward() t.turnLeft() elseif i%2 ~= 0 then t.turnRight() detectedDig() ----- t.forward() t.turnRight() end end elseif WIDTH%2 == 0 then if n%2 == 0 then if i+1<=WIDTH then if i%2 ~= 0 then t.turnLeft() detectedDig() ----- t.forward() t.turnLeft() elseif i%2 == 0 then t.turnRight() detectedDig() ----- t.forward() t.turnRight() end end elseif n%2 ~= 0 then if i+1<=WIDTH then if i%2 == 0 then t.turnLeft() detectedDig() ----- t.forward() t.turnLeft() elseif i%2 ~= 0 then t.turnRight() detectedDig() ----- t.forward() t.turnRight() end end end end end if n