Ahmed Hedait / Mbed 2 deprecated el16ah

Dependencies:   mbed

Committer:
ahmedhedait
Date:
Tue May 08 12:20:04 2018 +0000
Revision:
21:bcc84d5cb068
Parent:
20:041affa5e242
Child:
22:745b4d352183
implemented the code in which when the ball reach the goal, bravo is printed and maze disappears.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ahmedhedait 17:68d4b4095d80 1 #ifndef MAZEENGINE_H
ahmedhedait 17:68d4b4095d80 2 #define MAZEENGINE_H
ahmedhedait 17:68d4b4095d80 3
ahmedhedait 17:68d4b4095d80 4 #include "mbed.h"
ahmedhedait 17:68d4b4095d80 5 #include "N5110.h"
ahmedhedait 17:68d4b4095d80 6 #include "Gamepad.h"
ahmedhedait 18:d18b9185fa4f 7 #include "Maze.h"
ahmedhedait 18:d18b9185fa4f 8 #include "Ball.h"
ahmedhedait 17:68d4b4095d80 9
ahmedhedait 17:68d4b4095d80 10 class MazeEngine
ahmedhedait 17:68d4b4095d80 11 {
ahmedhedait 17:68d4b4095d80 12 public:
ahmedhedait 17:68d4b4095d80 13
ahmedhedait 17:68d4b4095d80 14 MazeEngine();
ahmedhedait 17:68d4b4095d80 15 ~MazeEngine();
ahmedhedait 21:bcc84d5cb068 16
ahmedhedait 19:c6ebd1394bda 17 void init();
ahmedhedait 19:c6ebd1394bda 18 void read_input(Gamepad &pad);
ahmedhedait 19:c6ebd1394bda 19 void draw(N5110 &lcd);
ahmedhedait 20:041affa5e242 20 void update(Gamepad &pad);
ahmedhedait 21:bcc84d5cb068 21
ahmedhedait 17:68d4b4095d80 22 private:
ahmedhedait 17:68d4b4095d80 23
ahmedhedait 21:bcc84d5cb068 24 void check_goal(Gamepad &pad);
ahmedhedait 21:bcc84d5cb068 25 void print_win(N5110 &lcd);
ahmedhedait 21:bcc84d5cb068 26
ahmedhedait 19:c6ebd1394bda 27 Maze _maze;
ahmedhedait 20:041affa5e242 28 Direction _dir;
ahmedhedait 20:041affa5e242 29 Ball _ball;
ahmedhedait 21:bcc84d5cb068 30 Vector2D ball_pos;
ahmedhedait 19:c6ebd1394bda 31
ahmedhedait 17:68d4b4095d80 32 };
ahmedhedait 17:68d4b4095d80 33 #endif