title: Using Structs in C
body: <p>Hi im building a simple game in c (im new to the language). Im using the following structs: </p>
  
  <pre><code>typedef struct
  {
      int adjacent_mines;
      bool revealed;
      bool is_mine;
  } Tile;
  
  struct GameState
  {
      Tile tiles[NUM_TILES_X][NUM_TILES_Y];
  };
  typedef struct GameState GameState;
  </code></pre>
  
  <p>Im wondering how to properly call and set the structs? I have the following code where i would like to set state of each Tile. </p>
  
  <pre><code>void intialize_mines(){
      for (int i =0; i &lt; NUM_TILES_X; i++){
          for (int j =0; j &lt; NUM_TILES_Y; j++){
              tiles[i,j].revealed = false;
          }
      }
  }
  </code></pre>
  
  <p>But according to my console output i have done this incorrectly. How would i go about setting this correctly? </p>