tx.state.move_mode = 'dig'
tx.down()
tx.forward()
tx.down()
tx.forward()
tx.left()
tx.forward()
tx.forward()
tx.right()
tx.up()

function turn(to_right)
    if to_right == 1 then
        fturn = tx.right
    else
        fturn = tx.left
    end
    fturn()
    tx.forward()
    fturn()
end

for row=1,5 do
    tx.placeUp()
    tx.digDown()
    for col=1,4 do
        tx.forward()
        tx.digDown()
        tx.placeUp()
    end
    turn(row % 2)
end