ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18s2a_2

Dependencies:   mbed

Revision:
13:c20acb3b1adf
Parent:
12:8eb40a18f15d
Child:
16:8cb23849b95a
--- a/SnakeEngine/SnakeEngine.h	Fri Jun 05 20:47:43 2020 +0000
+++ b/SnakeEngine/SnakeEngine.h	Fri Jun 05 22:13:33 2020 +0000
@@ -24,11 +24,12 @@
     SnakeEngine();
     ~SnakeEngine();
 
-    void init(int apple_size, int snake_speed, int snake_score);
+    void init(int apple_size, int snake_speed, int snake_score, int snake_snakeheight, int snake_snakewidth);
     void read_input(Gamepad &pad);  //Allows us to read the input from the thumbstick
     void update(Gamepad &pad, N5110 &lcd);      //Allows us to update the gamepad 
     void draw(N5110 &lcd);          //Allows us to draw on the screen
     void dead(N5110 &lcd, Gamepad &pad); // The snake is DEAD :(
+    void eat(N5110 &lcd, Gamepad &pad); // Deals with the snake eating the apple
 private:
 
     void print_score(N5110 &lcd);
@@ -40,6 +41,8 @@
     int _apple_size;  //Apple size is defined and taken from main.cpp
     int _snake_speed; //Stores the speed the snake goes
     int _snake_score; //Stores the score
+    int _snake_snakeheight; // Snake Hight
+    int _snake_snakewidth; // Snake Width
     bool _dead;
     
     Snake _s;   //Allows us to use the Snake