Snake game error

Hi everyone,

Iam making a snake game for my class but it has to have an interactive aproach, so my idea was that every time the snake eat an apple an image in the background would appear, so you would win the game when the 22 pictures were in the background but i dont know how to do that tipe of coding can someone help me.
Thx for all answers

Why not …

maximages = 10
for each loop:
 move snake
 if snake touch apple
    eat apple
    imagecounter + 1 
    show image for imagecounter
    if (imagecounter reach maximages)
      player win game

Cheers!