Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: MazeEngine/MazeEngine.h
- Revision:
- 24:166d726b0f13
- Parent:
- 22:745b4d352183
--- a/MazeEngine/MazeEngine.h Tue May 08 13:13:20 2018 +0000
+++ b/MazeEngine/MazeEngine.h Tue May 08 13:39:31 2018 +0000
@@ -7,29 +7,49 @@
#include "Maze.h"
#include "Ball.h"
+/** MazeEngine Class
+@author Ahmed Hedait, University of Leeds
+@brief When goal is reaches at end of the game.
+@date May 2018
+*/
+
class MazeEngine
{
public:
+ /** Constructor */
MazeEngine();
+
+ /** Destructor */
~MazeEngine();
void init();
+
+ /** Read the inputs of the game.
+ */
void read_input(Gamepad &pad);
+
+ /** Intialising the drawing of the ball and maze
+ */
void draw(N5110 &lcd);
+
+ /** Updating when the ball goes through the opening hole
+ * @brief Print out that the game is finished and re-start if needed
+ * controlled within the Gamepad Joystick
+ */
void update(Gamepad &pad);
private:
void check_goal(Gamepad &pad);
- void print_win(N5110 &lcd);
+ void print_win(N5110 &lcd);
void check_wall_collision(Gamepad &pad);
Maze _maze;
Direction _dir;
Ball _ball;
Vector2D ball_pos;
-
+
int _a;
int _b;
int _c;