I would like to store all my snakes
, in a snakeList
.
When the user creates new snakes, I would like the program to keep them, and store them in a List
.
But I don't know how to do that.
If I write:
List<Snake> snakeList = new List<Snake>();
Then, whenever I restart the program, I think it creates a new snakeList
every time.
I would like to keep using the same snake list, even if the program restarts.
Should I use XML
for that?