The lexicographical (or row-major) order of a mapon Nov 25 in Math, Programeren by skerit
Storing a map in memory can happen in two ways.
You can store every Y-position in an X-row, like this:
map[X][Y] = tile;
Basically, you calculate the ID of the tile, what total number it is on the map.
lexicograph = y * width + x;