I'm wondering What data structure should I use to represent a square game board(consider each cell can have some color). The most natural idea is a two dimensional List, but it's hard to query and change it.
So, now use a Map where keys are ${x}.${y}
(there is no tuples in JS:() and values are stings which represent colors
Something like this:
Map([['0.0', 'red'], ['0.1', 'red'], ['1.0', 'blue'], ['1.1', 'red']])
Is it ok to use such data structure? Is there any better solution in terms of Immutable.js?