Snake

Haven't you had the chance to play the legendary game that was probably on every touch-screen mobile phone, maybe your parents'? No problem! The Snake minigame is a modern variation of this classic snake game. The goal is to control the snake with a joystick so that it avoids its own tail and collects food, which gradually grows. As soon as the snake hits its own body, the game ends. You get points for each piece of food eaten. But be careful! With each point, the snake's speed also increases. It is then all the more difficult not to bite its own tail! Your task is to achieve the highest score possible.

Description

Control

The joystick is used to determine the direction of the snake's movement. The direction of the lever deflection corresponds to the direction in which we want the snake to crawl.

Playing area

The entire micro:bit display represents the playing field, i.e. the arena, on which the snake crawls. If the snake reaches one edge of the arena, it will appear on the other side in the next step. Be sure to use this feature! This way you can avoid biting the snake's tail.

The goal of the game

The goal of this game is to collect as many points as possible and make the snake as long as possible. So who can fill the entire arena with their snake body?

Programme

Snake

You can find the program for this mine game at the link, but it doesn't end there. Try the game by controlling it with the buttons on the joystick instead of the joystick.

If you are a more skilled programmer and you are confident, you can try generating two meals for the snake at once.

You can try creating a premium food that will feed a snake twice.