Class used to run the maze game loop.

Revision:
0:afee1085c5ef
Child:
1:5a44ce88c5e2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MazeEngine.cpp	Fri Apr 07 10:29:16 2017 +0000
@@ -0,0 +1,62 @@
+/*
+ 
+ @file mazeEngine.cpp
+ 
+ (c) Max Houghton 19.03.2017
+ Roller Maze Project, ELEC2645, Univeristy of Leeds
+ 
+ */
+
+#include "MazeEngine.h"
+
+MazeEngine::MazeEngine()
+{
+    
+}
+
+MazeEngine::~MazeEngine()
+{
+    
+}
+
+void MazeEngine::init(int mazeIndex, int x, int y, int radius)
+{
+    // maze parameters
+    _mazeIndex = mazeIndex;
+    
+    // ball parameters
+    _radius = radius;
+    _x = x;
+    _y = y;
+    
+    // initialise ball & maze with parameters
+    _ball.init(_x, _y, _radius);
+    _maze.init(_mazeIndex);
+}
+
+void MazeEngine::readInput(Gamepad &pad, FXOS8700CQ &device)
+{
+    // acquire input from devices
+    _direction = pad.get_direction();   // direction is a 2D struct
+    _magnitude = pad.get_mag();
+    /*
+     else {
+     
+     _direction = devie.
+     }
+     */
+}
+
+void MazeEngine::update(Gamepad &pad, N5110 &lcd)
+{
+    _ball.update();
+    
+}
+
+void MazeEngine::draw(N5110 &lcd)
+{
+    _ball.draw(lcd);
+    _maze.draw(lcd);
+}
+
+