Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i = 0 ; i < rNumber-1 ; i++) {
- if xpos > 0 and xpos < rmax xpos = xpos+xdir else xpos = xpos+0
- if ypos > 0 and ypos < rmax ypos = ypos+ydir else ypos = ypos+0
- dir = irandom(1)
- if dir = 0 xdir = choose(-1,1) else xdir = 0
- if dir = 1 ydir = choose(-1,1) else ydir = 0
- if ds_grid_get(mainGrid, xpos+xdir, ypos+ydir) != 1 {
- ds_grid_set(mainGrid, xpos+xdir, ypos+ydir, 1)
- count +=1
- }
Advertisement
Add Comment
Please, Sign In to add comment