I want to make a snake game, but i am unfamiliar with the syntax of matrices and i hope to avoid them in programming. (which is funny because in c++ i prefer 2d lists as often as possible) Is it possible to do it with two lists, list x and list y, to list the coordinates of the snakes segments, then delete from the back and add to the front every time (given that there is no apple eaten) ?
Yes it's possible to do it with 2 lists. I would scroll it, to keep the length of the list small.
With A as the length of the snake:
Pt-Off(L1(A),L2(A // or pxl-on( if you want to
Pt-On(X value,Y value // or pxl-on(
So you want to do a "reverse-pop then push" kinda thing? If that's it, I think there's a quick way of doing it (compared to using a loop) but I have no clue what that way is. Anyway, yes, you could do that with two lists.
On a side note, matrices are accessed/used by [LETTER](y-coordinate, x-coordinate).
Projects: BexIDE (hold), Hadean.NET, Legend of Zelda: Link to the Future