Here's my version of snake. I have it done enough to say it's a fully-fledged version. Yes, I know my graphics aren't the best, but I was more focused on creating the best version of snake I could and be as economical with the processing as possible. If you're in need of an idea as to how to create a random generator that has to take into consideration where other objects are, then you may want to take a look at how my create_food function works. It may not be the best, but it's much better than randomly choosing locations and checking whether they're acceptable.
Constructive criticism is always welcome.
Just like normal snake, attempt to eat the food without running into yourself or going out of bounds.
Added start/win/lose graphics and menus
Added food eating sound
Added out-of-bounds and tail-eating lose conditions
Added "choosey" random food placement algorithm
Retooled game checks to be more efficient (within ticks where possible)
Added a substantial amount of comments to code
Initial game release
[Please log in to post a comment]