I have snake class and food class that works properly. The most confusing part is how do I make a method that make the body grows. What I've done so far are: public Rectangle[] bodyPoints = new Rectangle[100]; , public BufferedImage body and along with other variables like size, tail, and head . I am using a .png with a Rectangle hitbox to detect intersection for the snake head, so I was thinking for doing the same thing for the body.
I found it's hard to find tutorials on YouTube that explains clearly on body parts logic.