Simon Atkinson 201255483

Dependencies:   mbed

Snake Game

Summary

Hello and welcome to my Snake Game. Snake is a simple game where you control a snake and eat an apple which increases your size. Normally touching the walls will kill you, always touching yourself will make you die!

Controls

The Controls for this game are simple the Start button starts the game (who would have thought) this button is the left button on the bottom of the gamepad next to the two blue potentiometers. The Reset button on the right of the potentiometers resets the game. Once the game starts use the left thumbstick to control the movement of the snake.

If you hit the wall with your snake you will die and the game will end.

Bugs/Missing Features

Unfortunatley I wasn't able to get the game eating the apple to work, when I tried I could never get it to detect the collisions I tried a few different ways but ran out of time. Because that doesn't work the score doesn't increase and the apple doesn't spawn in a different place. I will try continue to work on this when I have time as I enjoyed doing this project even though it was very frustrating at times!

Files at this revision

API Documentation at this revision

Comitter:
Psy1990
Date:
Fri Jun 05 22:57:33 2020 +0000
Parent:
20:11a0c8c5bdbf
Commit message:
Final Submission. I have read and agreed with Statement of Academic Integrity.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jun 05 22:54:52 2020 +0000
+++ b/main.cpp	Fri Jun 05 22:57:33 2020 +0000
@@ -22,8 +22,8 @@
 #define APPLE_SIZE 2
 #define SNAKE_SPEED 1
 #define SNAKE_SCORE 0
-#define SNAKE_SNAKEHEIGHT 10  // Keep these equal to give it a square
-#define SNAKE_SNAKEWIDTH 10  // Keep these equal to give it a square
+#define SNAKE_SNAKEHEIGHT 5  // Keep these equal to give it a square
+#define SNAKE_SNAKEWIDTH 5  // Keep these equal to give it a square
 
 
 // structs