You can't return true
, or you'll return true if the first element is true.
Try this:
for (int r = 0; r < NUM_CELLS; r++)
{
for (int c = 0; c < NUM_CELLS; c++)
{
if(!grid[r, c])
{
return false;
}
}
}
return true;