Randomizing Tiles

I currently have an array (String) I’m using to draw a tiled map on the screen. I would like a way to randomize each number in it to create random tile placement. If anybody knows a way to do this, please tell me.

Also, if there is a better way to do this other than a string array, please tell me.

I may have just figured something out, but am not sure if it is the best…
Should I just make everything there zeros, use a for-loop to check them, and if they are zeros just randomize them?

Yup! Or you could just randomize them from the start…

Don’t you think array of integer is better then string for tile’s index?

I recommend using a seeded Random instance and generating tiles based on biomed areas so it doesn’t look ugly. You can biome areas possibly by generating x, y, height and width for a biome, then place tiles in the map accordingly.

Thats the basics of how I’d do it.