I'm using a generic matrix container to store the tile grid for my RTS game.
This is where I am confused: a matrix is traditionally row major, i.e. matrix(0, 10) means 'at 0th row, 10th column.' A map on the other hand is 'column major,' i.e. grid(0, 10) intuitively means 'a tile at X=0, Y=10.'
This leads to a quite a few places where I need to swap X and Y to access proper element of the map.
I tried to make them both consistent (i.e. make a matrix column major or a grid row major) but that adds more confusion, maybe because I'm a slave of my habits.
How should I do this?