Compare commits
1 commit
325cd5c7f3
...
4853d3c729
Author | SHA1 | Date | |
---|---|---|---|
Théophile Bastian | 4853d3c729 |
|
@ -70,25 +70,21 @@ function move_forward()
|
|||
rc, desc = turtle.forward()
|
||||
if not rc then abort("Move: "..desc) end
|
||||
_count_move_dir(facing)
|
||||
_dump_pos()
|
||||
end
|
||||
function move_back()
|
||||
rc, desc = turtle.back()
|
||||
if not rc then abort("Move: "..desc) end
|
||||
_count_move_dir(facing + 2)
|
||||
_dump_pos()
|
||||
end
|
||||
function move_up()
|
||||
rc, desc = turtle.up()
|
||||
if not rc then abort("Move: "..desc) end
|
||||
height = height + 1
|
||||
_dump_pos()
|
||||
end
|
||||
function move_down()
|
||||
rc, desc = turtle.down()
|
||||
if not rc then abort("Move: "..desc) end
|
||||
height = height - 1
|
||||
_dump_pos()
|
||||
end
|
||||
|
||||
function go_to_depth(dd)
|
||||
|
@ -235,7 +231,8 @@ function main()
|
|||
while true do
|
||||
print("Finding shaft")
|
||||
find_next_shaft()
|
||||
print("Mining shaft")
|
||||
print("Mining shaft at position:")
|
||||
_dump_pos()
|
||||
mine_shaft()
|
||||
|
||||
print("Discharging")
|
||||
|
|
Loading…
Reference in a new issue