title: Snake Game - Can't get snake body to follow snake head
body: <p>I have been working on a snake game using sfml and c++ but I am having trouble getting the tail of my snake to follow the snake head which is defined as Snake[0] in my code below. I have implemented code that I think should work but doesn't which is the following</p>
  
  <pre><code>    for (int i = 1; i &lt; snakeSize; i++)
      {
          snakePartX[i] = snakePartX[i-1];
          snakePartY[i] = snakePartY[i-1];
      }
  </code></pre>
  
  <p>The way I understand it (and I am probably incredibly wrong and would appreciate if anyone could point out what is actually happening here) is that, that piece of code should set the value of a snake body part to the position of where the previous body part WAS located so that when the program loops they are set to follow the snake as it travels.</p>
  
  <p>What actually does happen though is that when the snake eats an apple the snake will gain 1 block to its tail, but will not grow any farther.</p>