title: How to check if all the values of an array are equal to 0?
body: <p>The context of the program is a game involving pegs and discs. The user inputs the amount of pegs (max of 20) and the amount of discs on each peg (max of 10). Two players go back and forth removing any amount of discs on a single peg each turn, given that there are enough discs to remove on that peg. The player to remove the last disc loses. </p>
  
  <p>The number of discs are stored in an array, where the index of the array corresponds the peg number. I have a boolean function that checks whether or not the pegs are empty of discs, implying someone has won. There is some logical error in my code but I can't figure out what it is:</p>
  
  <pre><code>bool checkPegs(int array[], int size)
  {
    int checker(0);
    for (int i = 0; i &lt; size; i++)
    {
        if(array[i] = 0)
        {
          return true;
        }
        else
        {
          return false;
        }
    }
  }
  </code></pre>