ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18ajst

Dependencies:   mbed

Revision:
12:c557b6c9b17a
Parent:
9:62fe47a1374f
Child:
14:2d7e41f46879
--- a/Bullets/Bullets.cpp	Sun May 24 21:21:26 2020 +0000
+++ b/Bullets/Bullets.cpp	Mon May 25 17:22:06 2020 +0000
@@ -1,22 +1,11 @@
 #include "Bullets.h"
 Serial pcb(USBTX, USBRX);
-Bullets::Bullets(int ex, int wy, Direction d)
+Bullets::Bullets(int ex, int wy, int d)
 {
     _dir = 0;
     _x = ex;
     _y = wy;
-    if (d == N) {
-        _dir = 0;
-    } 
-    else if (d == E) {
-        _dir = 1;
-    }
-    else if (d == S) {
-        _dir = 2;
-    }
-    else if (d == W) {
-        _dir = 3;
-    }
+    _dir = d;
     //pcb.printf("Direction = %d", _dir);
 }