Coordinator v2

Dependencies:   NerfUSXbee PinDetect EthernetInterface JSON MFRC522 WebSocketClient mbed-rtos mbed

Revision:
1:e1c5259b7d9a
Child:
2:019d8848cf7e
diff -r 000000000000 -r e1c5259b7d9a includes/GameCoordinator.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/includes/GameCoordinator.hpp	Mon Apr 10 15:02:24 2017 -0400
@@ -0,0 +1,30 @@
+#pragma once
+#include <vector>
+#include "ports.hpp"
+#include "Target.hpp"
+#include "ServerData.hpp"
+#include "GameMode.hpp"
+#include "ReflexMode.hpp"
+#include "SpeedMode.hpp"
+
+class GameCoordinator
+{
+    public:
+        GameCoordinator();
+
+        void start_game(ServerData *configs);
+        void stop_game();
+        void ticker_callback();
+        void get_next_round();
+
+        vector<Target> targets;
+        Thread Tget_next_round;
+    private:
+        vector<GameMode*> game_modes; 
+        GameMode* current_game;
+        uint16_t target_timeout = 10000;
+        uint8_t number_of_targets = 10;
+        Ticker ticker;
+};
+
+extern GameCoordinator gameCoordinator;
\ No newline at end of file