ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

Revision:
4:740e14ebbc97
Parent:
3:f9cd1a38d5c6
Child:
5:bb6edc5b5be3
diff -r f9cd1a38d5c6 -r 740e14ebbc97 RosenEngine/RosenEngine.cpp
--- a/RosenEngine/RosenEngine.cpp	Sat Mar 02 19:36:45 2019 +0000
+++ b/RosenEngine/RosenEngine.cpp	Mon Mar 04 14:05:00 2019 +0000
@@ -11,12 +11,23 @@
 
 }
 
-/*
-void RosenEngine::init(int ship_width,int ship_speed,int ship_x_pos,int ship_y_pos)
+
+// Checks if a mission has been completed and if it has return new mission number
+
+void RosenEngine::init(int ship_speed,int ship_width,int ship_xpos,int ship_ypos)
 {
-    _ship_width = ship_width;
+    // initialise the game parameters
     _ship_speed = ship_speed;
-    _ship_x_pos = ship_x_pos;
-    _ship_y_pos = ship_y_pos;
+    _ship_width = ship_width;
+    _ship_xpos = ship_xpos;
+    _ship_ypos = ship_ypos;
+    
 }
-*/
\ No newline at end of file
+
+void PongEngine::read_input(Gamepad &pad)
+{
+    Vector2D mapped_coord = pad.get_coord();
+    float x_joystick = mapped_coord.x;
+    float y_joystick = mapped_coord.y;
+}
+