Class used to run the maze game loop.
Diff: MazeEngine.h
- Revision:
- 0:afee1085c5ef
- Child:
- 1:5a44ce88c5e2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MazeEngine.h Fri Apr 07 10:29:16 2017 +0000 @@ -0,0 +1,47 @@ +// +// MazeEngine.h +// +// +// Created by Max Houghton on 19/03/2017. +// +// + +#ifndef MAZEENGINE_H +#define MAZEENGINE_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "FXOS8700CQ.h" +#include "Ball.h" +#include "Maze.h" + +class MazeEngine +{ + +public: + + MazeEngine(); + ~MazeEngine(); + + void init(int mazeIndex, int x, int y, int radius); + void readInput(Gamepad &pad, FXOS8700CQ &device); + void update(Gamepad &pad, N5110 &lcd); + void draw(N5110 &lcd); + +private: + + Maze _maze; + Ball _ball; + + int _mazeIndex; + int _x; + int _y; + int _radius; + + Direction _direction; + float _magnitude; + +}; + +#endif