c = 6


a = 0
b = 0
d = 0

function digRow()
while b < c do
turtle.dig()
turtle.digDown()
os.sleep(.5)
if turtle.forward() == true then
b = b + 1
end
end
d = d + 1
end

function turnToNextColumn()
if d%2 == 0 then
turtle.turnRight()
else
turtle.turnLeft()
end
turtle.dig()
os.sleep(.5)
if turtle.forward() ~= true then
for i=0,6,1 do
os.sleep(.5)
turtle.dig()
end
turtle.forward()
end
if d % 2 == 0 then
turtle.turnRight()
else
turtle.turnLeft()
end
b = 0

end

function checkInv()
if turtle.getItemCount(14) ~= 0 then
print("BWAH")


end
end
while d < c do
digRow() 
turnToNextColumn()
checkInv()
end
