title: Problem using collision detection to increment the game score in SFML 2.4
body: <p>I am making a flappy bird game just to get an idea of how to make games using SFML 2.4 and C++. I have a scoring system which is supposed to increment the score by 1 everytime the bird sprite intersects with an invisible pipe. However, instead of incrementing the score by 1 the score comes to around 57 and 60. Any ideas to get this working is really appreciated. </p>
  
  <pre><code>int main()
  {
      int score = 0;
  
      float PipeInvisi = 200.0;
  
      while(window.isOpen())
      {
          if (state == State::PLAYING)
          {
              // Setup the Invisible Pipe for Movement
              if (!PipeInvisbleActive)
              {
                  // How fast is the Pipe
                  spriteInvisi.setPosition(905, 0);
                  PipeInvisbleActive = true;
              }
              else
              {
                  spriteInvisi.setPosition(spriteInvisi.getPosition().x - (PipeInvisi * dt.asSeconds()), spriteInvisi.getPosition().y);
                  // Has the pipe reached the right hand edge of the screen?
                  if (spriteInvisi.getPosition().x &lt; -165)
                  {
                      // Set it up ready to be a whole new cloud next frame
                      PipeInvisbleActive = false;
                  }
              }
  
              // Has the Bird hit the invisible pipe
              Rect&lt;float&gt; Birdie = spriteBird.getGlobalBounds();
              Rect&lt;float&gt; Paipu5 = spriteInvisi.getGlobalBounds();
              if (Birdie.intersects(Paipu5))
              {
                  // Update the score text
                  score++;
                  std::stringstream ss;
                  ss &lt;&lt; "Score = " &lt;&lt; score;
                  scoreText.setString(ss.str());
                  clock.restart();
              }
          }
      }
  }
  </code></pre>