4 integers are enough to write a Snake Game | Personal Site of Andrei N. Ciobanu
… actually you can use only 2, but this will make your life a little more miserable.
Contents
Introduction
The code
The memory layout
map
vars
shape
The game loop
The function that moves the snake:
The function that displays the snake
After the macros expand
Final thoughts
Introduction
After not implementing a game of Snake in ages, I decided to do my best today, but with some strange and absurd limitations in mind, you know, to spice things up:
andreinc.net