ELEC2645 (2018/19) / Mbed 2 deprecated el17dtt

Dependencies:   mbed

Revision:
10:b939edd9b87c
Child:
11:0e6a221ad8a9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Map/map.cpp	Fri May 10 12:00:30 2019 +0000
@@ -0,0 +1,38 @@
+
+#include "map.h"
+
+
+void Map::init() {
+    
+    set_player_curvature(0.0f);
+    
+    }
+
+// accessors
+float Map::get_player_curvature() {
+    
+    return _player_curvature;
+    
+    }
+    
+float Map::get_timed_curvature() {
+    
+    return _timed_curvature;
+    
+    }  
+    
+// mutators
+void Map::set_player_curvature(float _player_curvature) {
+    
+    if(_player_curvature < -1.0f) _player_curvature = -1.0f;
+    if(_player_curvature > 1.0f) _player_curvature = 1.0f;
+    
+    this->_player_curvature = _player_curvature;
+    
+    }
+
+void Map::set_timed_curvature(float _timed_curvature) {
+    
+    this->_timed_curvature = _timed_curvature;
+    
+    }