Mine: fix move

This commit is contained in:
Théophile Bastian 2020-08-18 18:38:51 +02:00
parent e806819475
commit fb47e96955

View file

@ -68,6 +68,7 @@ end
function go_to(dh, dd, ds)
go_to_depth(0)
if height ~= dh then
while height > dh do
turtle.down()
height = height - 1
@ -76,7 +77,9 @@ function go_to(dh, dd, ds)
turtle.up()
height = height + 1
end
end
if side ~= ds then
turn_abs(1)
while side > ds do
@ -87,6 +90,7 @@ function go_to(dh, dd, ds)
turtle.forward()
side = side + 1
end
end
go_to_depth(dd)
end
@ -135,7 +139,7 @@ function find_next_shaft()
while true do
print("Climb")
for hei=0,MAX_HEIGHT-1 do
for hei=1,MAX_HEIGHT-1 do
if (hei % 3) == 0 then
if turtle.detect() then
return