Golang Project Structure

Tips and tricks for writing and structuring Go code

The Extremely Hungry Snake

Below is a modern version of the classic snake game, using retro pixel-art graphics.

The goal of the game is to collect as many items of food as possible without hitting one of the walls or eating your own tail. But watch out for the poisoned skulls: if you accidentally eat one, you’ll die instantly!

You can use the W, A, S and D keys to move the snake or you can press on the gameboard directly above, below, to the left or to the right of the snake in order to move the slippery serpentine creature in that direction.

Some foods are rarer than others, and these are worth more points. The elusive cherry is the most valuable item of all. Various other factors, such as how long it takes the snake to reach each item of food, are also taken into account when calculating the score.

Now let’s play the game: