Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

Nested For Loop Question

$
0
0
Hi All, I'm building a City Generator currently using nested for loops to create a Grid. for (int x = 0; x < gridX; x++) { for (int z = 0; z < gridZ; z++) { Build City } } I would like to group areas of the grid to make Regions like below in the example below where gridX = 5 and gridZ = 5 and Regions = 5. ![alt text][1] [1]: /storage/temp/188634-grid2.jpg Is this possible? and how? Thanks,

Viewing all articles
Browse latest Browse all 184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>