title: objective c array of booleans
body: <p>I am working on a game that will have a two dimensional board of dots, each with one boolean attribute (occupied/not occupied). I was thinking the best way to accomplish this is to create a simple c array of Booleans. This will be much more efficient than creating a mutablearray. I'm just confused the best way to accomplish this. The trouble is that I don't know the size of the board until I initialize the board object. 
  The interface looks like this:</p>
  
  <pre><code>@interface TouchBoard : NSObject{
  NSInteger height,width;
  BOOL dots[10][10];
  
  }
  </code></pre>
  
  <p>And the implementation like this:</p>
  
  <pre><code>-(id)initWithHeight:(NSInteger)rows Width:(NSInteger)columns{
      if ( self = [super init]){
          height = rows;
          width = columns;
          dots[height][width];
      }
      return self;
  
  }
  </code></pre>
  
  <p>Trouble is, in the interface, if i try to declare the dots variable with a dynamic number of indices, dots[][], it'll just give me an error.
  Obviously I don't know the size of the array until the object is initialized, but after that it's not going to be changing and only its elements will be changing from true/false.</p>
  
  <p>What is the best way to accomplish this?</p>