I made a snake game where I printed a multidimensional array as a map and I used gotoxy function from conio.h library to move the head of the snake around ;
But I have no idea how to make a tail that follows the head of the snake . If any of you can tell me a idea or something but if it requires windows programming code please exemplify, ty ;
A list of some sort. Each element in the list is one piece of the snake. Printing each element prints the whole snake.
The snake "moves" when you add to front of list a new position for the head and discard the last element. If you don't discard the last, the snake will be one piece longer than before.