Advertisement
whenov

Untitled

Apr 26th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. (function()
  2.     for n=1,size do
  3.         for m=1,size-1 do
  4.             if not tryForwards() then return end
  5.         end
  6.         if n<size then
  7.             local turn = (math.fmod(n,2) == 0) and turnLeft or turnRight
  8.             turn()
  9.             if not tryForwards() then return end
  10.             turn()
  11.         end
  12.     end
  13. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement