ELEC2645 (2018/19) / Mbed 2 deprecated el17lw

Dependencies:   mbed

Revision:
11:b66170249a26
Parent:
10:8bf3713d9e9c
Child:
14:9861fe85c803
diff -r 8bf3713d9e9c -r b66170249a26 Engine/Engine.cpp
--- a/Engine/Engine.cpp	Tue Mar 26 11:03:05 2019 +0000
+++ b/Engine/Engine.cpp	Thu Mar 28 21:27:05 2019 +0000
@@ -19,14 +19,16 @@
   _jump_counter = 0;
   _direction = Left;
   _level_condition = 0;
+  _start_platform = true;
   _x = 40;
-  _y = 40;
+  _y = 23;
 }  
 
 void Engine::init() {
   reset_skater();
   _lower_map.init(40);
   _upper_map.init(22);
+  _skater.set_reset_flag(false);
   srand(time(NULL));
 }
 
@@ -126,4 +128,9 @@
   lcd.drawLine(_upper_line_2.x_start,_upper_line_2.y,_upper_line_2.x_end,_upper_line_2.y,FILL_BLACK);
   lcd.drawLine(_upper_line_1.x_start,_upper_line_1.y,_upper_line_1.x_end,_upper_line_1.y,FILL_BLACK);
   lcd.drawLine(_upper_line_3.x_start,_upper_line_3.y,_upper_line_3.x_end,_upper_line_3.y,FILL_BLACK);
+}
+
+bool Engine::get_start_platform() {
+  if(_input.A_flag) _start_platform = false;
+  return _start_platform;
 }
\ No newline at end of file