The snake moves around the screen, picking up fruits. Three fruits are shown on the screen at every point in time. When the snake eats one fruit, an additional point is added to the user’s score. When the snake hits the borders or its own tail, game over.
- Download the files into one folder and open it in the Monitor Program OR open the file snakeGame_CPUlator.c on https://cpulator.01xz.net/?sys=arm-de1soc and select 'C' as the language
- Compile and load the program on Monitor Program / CPUlator
- Select a game mode using the switches on the DE1-SoC board
(a) SW[3] = Default, SW[4] = Easy, SW[5] = Hard
(b) Note: only one switch (out of the nine) should be on at any given time
- After selecting the game mode (turn one of SW[3]-[5] on AND off), turn on SW[1] to start the game
- Use the pushbuttons on the DE1-SoC board or keyboard arrows to control the movement of the snake
(a) KEY[0] = Up, KEY[1] = Down, KEY[3] = Left, KEY[3] = Right
- Once the game is over, hit SW[1] to restart the game