Added return success bool for orienting.

This commit is contained in:
Harrison Deng 2021-05-03 18:30:33 -05:00
parent 48af2c55cf
commit 5a05ede075

View File

@ -252,12 +252,11 @@ local function orient(v, forward, right)
if vectorEqual(v, forward) then
return
elseif vectorEqual(v, right) then
attemptMoveRight()
return attemptMoveRight()
elseif vectorEqual(v, -right) then
attemptMoveLeft()
return attemptMoveLeft()
else
attemptMoveRight()
attemptMoveRight()
return attemptMoveRight() and attemptMoveRight()
end
print("Orientation complete.")
end