2 dimentional array of pointers
I'm trying to make a c++ stratego game, It's going to be the first quality game i make so i'm trying to make it as good as possible but i'm still a newB in making games I'm hoping I'm doing the right stuff!
But enough, the point is: I want to make an array of 10 x 10 with pointers, for the playing field, empty fields all point to a empty play piece [as good as ZERO] and if there's a play piece, example a bomb, i want it to point at the bomb. The thing is also that all there are 6 bomb for each player so i placed the bombs in an array like this:
int MAX_BOMB = 6;
_bomb = new piece[MAX_BOMB]();
As you can see, the _bomb pointer points to the list of bombs and i want to add another pointer that points to lets say the 2nd element of the _bomb array, the 2nd bomb, and that pointer must be stored in the multidimentional field array.
Well, thats about it i guess, maybe there's even a smarter, more eficient way of doing this. Please let me know!