Final Submission. I have read and agreed with Statement of Academic Integrity.

Dependencies:   mbed Gamepad N5110 Joystick

Revision:
9:a7ea33e6bd82
Parent:
8:264398d3c610
Child:
10:aedca0082855
--- a/Game_engine/Game_engine.cpp	Thu May 09 10:55:22 2019 +0000
+++ b/Game_engine/Game_engine.cpp	Thu May 09 11:36:21 2019 +0000
@@ -18,6 +18,7 @@
     snake.set_food_posY((rand()%(11) + 1) * 4 - 2);
     _body_seg = 1;
     _direction = 0;
+    _score = 0;
 }
 
 void GameEngine::draw(N5110 &lcd) {    
@@ -70,6 +71,7 @@
             } 
         }
         _body_seg = _body_seg + 1;
+        _score = _score + 1;
     }    
 }
 void GameEngine::snake_body(N5110 &lcd) {
@@ -104,3 +106,6 @@
 int GameEngine::get_direction() {
     return _direction;    
 }
+int GameEngine::get_score() {
+    return _score;    
+}