ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
2:0b5e289ef905
Parent:
1:928632432ea4
Child:
5:3efbdcb3efaf
--- a/Engine/Engine.cpp	Tue Mar 12 09:32:51 2019 +0000
+++ b/Engine/Engine.cpp	Tue Mar 12 10:22:16 2019 +0000
@@ -6,14 +6,23 @@
     
 }
 
-void Engine::start() {
-    
-}
-
 void Engine::loop() {
-    
-}
-
-void Engine::stop() {
-    
+    while (1) {
+        Input::update();
+        Graphics::clear();
+        
+        if (Menus::count == 0) {
+            game.update();
+        }
+        
+        game.draw();
+        
+        if (Menus::count > 0) {
+            Menus::updateAndDraw();
+        }
+        
+        Graphics::render();
+        
+        wait_ms(1000/FPS);
+    }
 }
\ No newline at end of file