Guest User

Untitled

a guest
May 14th, 2016
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (i = 0 ; i < rNumber-1 ; i++) {
  2.  
  3.     if xpos > 0 and xpos < rmax xpos = xpos+xdir else xpos = xpos+0
  4.     if ypos > 0 and ypos < rmax ypos = ypos+ydir else ypos = ypos+0
  5.  
  6.     dir = irandom(1)
  7.     if dir = 0 xdir = choose(-1,1) else xdir = 0
  8.     if dir = 1 ydir = choose(-1,1) else ydir = 0
  9.  
  10.     if ds_grid_get(mainGrid, xpos+xdir, ypos+ydir) != 1 {
  11.         ds_grid_set(mainGrid, xpos+xdir, ypos+ydir, 1)
  12.         count +=1
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment