2D dynamic boolean array

A boolean still has 8 bits.

(Each boolean variable occupies one byte of memory.)

That boolean has enough room to hold information about 8 squares. Proper indexing would allow you to store information about the room in a 1D array, and in less space, if stored bit-by-bit.