Guest User

ASCII pron

a guest
Sep 19th, 2013
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 -- generate maze
  2.         maze[route] = 5
  3.         local tran = 0
  4.         local j = 0
  5.         local m = 0
  6.         local b = 0
  7.  
  8. gen1 = function(j,m,b)
  9.         j = math.random(4)
  10.         m = j
  11.         gen2(j,m,b)
  12.  
  13. end
  14. gen2 = function(j,m,b)     
  15.         b = route + a[j]
  16.         if maze[b] == 8 then
  17.             maze[b] = j
  18.             tran = route + (a[j]/2)
  19.             maze[tran] = 7
  20.             route = b
  21.             gen1(j,m,b)
  22.         end
  23.         j = j + 1
  24.         if j == 5 then
  25.             j = 1
  26.         end
  27.         if j ~= m then
  28.             gen2(j,m,b)
  29.         end
  30.         j = maze[route]
  31.         maze[route] = 7
  32.         if j < 5 then
  33.             route = route - a[j]
  34.             gen1(j,m,b)
  35.         end
  36.  
  37. end
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×