50.002 Team 14-3
Snake game
Description
Objective: Move the Snake around to eat fruits that are randomly spawned on the LED matrix and make the Snake grow. Once the Snake grows to 10 units long, the player wins. If the Snake collides with itself or the wall, the player loses.
Control Buttons
Yellow: Reset and Start
Blue: Move Up
Red: Move Left
Green: Move Right
White: Move Down
Gameplay: The Snake starts out as 2 LED red lights. A fruit with LED green lighting will appear randomly on the 32 by 64 LED matrix. Eating a fruit adds one red LED light to the Snake’s body. The Snake’s maximum length is 10 LED red lights long.
States: Once the snake reaches 10 LED lights long, the game enters FREEZE state from CHECK WIN. Everything on the screen will be erased to show the player has won the game.
If the snake collides with itself or the wall, the internal logic transitions from CHECK LOSE to FREEZE, where the snake is frozen on the screen and not erased like when winning the game.
The reset button can now be pressed to restart the game.