Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 13:c20acb3b1adf
- Parent:
- 12:8eb40a18f15d
- Child:
- 14:8d12bc972cb1
--- a/main.cpp	Fri Jun 05 20:47:43 2020 +0000
+++ b/main.cpp	Fri Jun 05 22:13:33 2020 +0000
@@ -22,6 +22,8 @@
 #define APPLE_SIZE 2
 #define SNAKE_SPEED 1
 #define SNAKE_SCORE 0
+#define SNAKE_SNAKEHEIGHT 5
+#define SNAKE_SNAKEWIDTH 5
 
 
 // structs 
@@ -71,7 +73,7 @@
     // need to initialise LCD and Gamepad 
     lcd.init(); // LCD turned on
     pad.init(); // GamePad turned on
-    snake.init(APPLE_SIZE,SNAKE_SCORE, SNAKE_SPEED); //Initiates the values based on what is on the top of this file
+    snake.init(APPLE_SIZE,SNAKE_SCORE, SNAKE_SPEED, SNAKE_SNAKEWIDTH, SNAKE_SNAKEHEIGHT); //Initiates the values based on what is on the top of this file
 }
 
 // this function draws each frame on the LCD