Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --test reading nad writing the buildzones grid to a file
- --creates a grid of absolute references (0,0) (1,0)
- function buildGrid(w,h)
- local grid = {}
- for x=0,w-1 do
- for z=0,h-1 do
- table.insert(grid,{x=x,z=z,played=false})
- end
- end
- return grid
- end
- LOCS = buildGrid(11,27)
- fs.makeDir("/records")
- local file = fs.open("/records/_buildzones-list.yaml","w")
- file.write(json.encodePretty(LOCS))
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement