diff --git a/src/main.lua b/src/main.lua index 5b0bdb0..3b7801b 100644 --- a/src/main.lua +++ b/src/main.lua @@ -585,15 +585,15 @@ local function VP_moveto(x,z, cx,cz,direction) move("back", true) end end - while y ~= cz do - if y > cz then -- z + while z ~= cz do + if z > cz then -- z if center(direction, 1) then move("right") end y = VP_movetoy(y, 3) cz = cz + 1 move("forward", true) direction = 1 end - if y < cz then + if z < cz then if center(direction, -1) then move("left") end y = VP_movetoy(y, 4) cz = cz - 1 @@ -790,8 +790,9 @@ while true do else local buf,dimensions = load(name) local stacks = VP_createstack(buf, dimensions) - - VP_printstack(stacks, dimensions) + + local cx,cz,direction = 1,1,0 + VP_printstack(stacks, dimensions, cx,cz,direction) end end end