Matthew Goldsmith / Mbed OS cis441projMS1a

Dependencies:   TextLCD

Revision:
1:54512aca944d
Parent:
0:ca7cb51e9fd1
--- a/Road.h	Sun Nov 10 23:02:16 2019 +0000
+++ b/Road.h	Mon Nov 11 00:50:05 2019 +0000
@@ -3,6 +3,7 @@
 
 #include "mbed.h"
 #include "AccCar.h"
+#include "Intersection.h"
 
 #define MAX_CARS 5
 
@@ -13,13 +14,15 @@
     EventFlags go_flags;
     EventFlags done_flags;
     int active_cars;
-    int intersection_car;
     
-    Road();
+    Road(Intersection* intersection, int roadId);
+    Intersection* intersection; 
     int try_enter_car(int time);
     void let_cars_update();
     void wait_for_car_update();
-    int check_exit_cars(int cars[]);
+    void check_exit_cars();
+    void intendToEnter(int id); 
+    int roadId; 
     
     void print_status();