When the head is in a box immediately adjacent to the tail, like in the picture below, the caterpillar dies. But I don't think the caterpillar should die. It hasn't run into itself yet.
Could you change the code to detect collision after all head, body, and tail "blocks" are updated/moved each game loop?
When the head is in a box immediately adjacent to the tail, like in the picture below, the caterpillar dies. But I don't think the caterpillar should die. It hasn't run into itself yet.
Could you change the code to detect collision after all head, body, and tail "blocks" are updated/moved each game loop?