x = 0 y = 0 lookup = {4, 1, 3, 0, 2} local function test() local val = lookup[(y % 5) + 1] return (x % 5) == val end local function run() for i = 1,3 do for j = 1,6 do turtle.forward() x = x + 1 if test() then turtle.digDown() end end turtle.turnRight() turtle.forward() y = y + 1 if test() then turtle.digDown() end turtle.turnRight() for j = 1,6 do turtle.forward() x = x - 1 if test() then turtle.digDown() end if test() then turtle.digDown() end end turtle.turnLeft() turtle.forward() y = y + 1 if test() then turtle.digDown() end turtle.turnLeft() end end run()