Can you explain what this does:
counter--;
if (counter == 0){
getWorld().removeObject(this);
}
I understand what the other things do I just don't understand this.
@cwars024, the constructor of the class has counter set to the number of parts to the snake and each body part will be removed after it becomes the tail end (which is when the counter reaches zero for that body part).
2020/1/17
2020/1/17