title: How does this CheckDraw method work for TicTacToe- C++
body: <p>I have to determine how exactly the CheckDraw method works but after reviewing the code for hours, I still haven't figured out anything.</p>
  <pre><code>bool CheckDraw(bool GameOver)
  {
     int n = 1;
     int i = 0;
     int j = 0;
     int counter = 0;
  
     for( i = 0; i &lt; 3; i++ ) {
        for( j = 0; j &lt; 3; j++ )
           if(table[i][j] == '0'+n)
              counter++;
        n++;
     }
     if( counter &lt; 1 )
     {
        cout &lt;&lt; &quot;It's a draw!\n\n&quot;;
        GameOver = true;
     }
     return GameOver;
  }
  </code></pre>