I have a grid of squares. Each square is either black or white. The grid ranges from X:-10 to 10 and Y:-10 to 10. I want to represent the grid with a 2D array of bools - black is true and white is false. Array indexes are only positive though- so if I want to create the grid with an array it would be bool array [21][21]. This does the job, but it gets confusing when I am trying to access an element. For example, if I want to access the coordinate "0,3" on the grid, my array index would be [11][14]. This works, but its really messy.
Is there any "cleaner" way I could get the index to correspond with the coordinate?