Why don't you try your own solution?
Rather than looking at someone else's code, and trying to do basically the same thing over again.
Snake:
- snake moves every 'tick' (ticks get quicker as the game progresses)
- snake hits wall - dead
- snake hits snake - dead
- player presses key - snake changes direction
- snake hits food - snake gets longer
That's pretty much all there is to it.
> do I need to know about: structures? array? etc.
Yes.
Or rather, your life will be a lot easier with careful use of these things.
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Offline 7,164 posts
since Dec 2005