Generation of vector Grid For a Game
<p>I am working on a c++ project and I'm stuck. I am trying to generate a grid from a vector that holds what elements are in the grid. Originally, the vector will hold something like(3,3) and I would simply create a grid that looks like this XXX. If it were (3,2,1), it would be XX|X. The first number in the parenthesis represents the total number of X's that is in my Grid(even after an X has been removed) and the consequent number represents the number of X's for each column like shown above.</p>

<p>The problem I'm having is creating a grid that also keeps track of the removed X's so when I want to recreate it, the space for the removed X's is there and not overwritten. </p>

<p>For instance:  <strong>Initial Grid</strong> = XXX|XX  =>(5,3,2)
               <strong>Later Grid</strong>   = OOX|XX  => (3,1,2)</p>

<p>Generating a grid from the "<strong>Initial Grid</strong>" is simple but generating later grids are hard(for me). For instance, My new vector would hold (3,1,2) for the "<strong>Later Grid</strong>". If I want to generate the "Later Grid" using the (3,1,2) representation, how should I do it. Any help is greatly appreciated. </p>

<p>This is not a homework, this is a side project that I'm working on.</p>
