Aiming Wu / Mbed 2 deprecated 2645_Assignment

Dependencies:   mbed N5110

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Begin.h Source File

Begin.h

00001 #ifndef BEGIN_H
00002 #define BEGIN_H
00003 
00004 #include "mbed.h"
00005 #include "N5110.h"
00006 #include "Gamepad.h"
00007 #include "Wall1.h"
00008 #include "Bird.h"
00009 
00010 /**  Begin class
00011 
00012 *@brief Library to combine the Bird and the Wall1
00013 *@author Wu Aiming
00014 *@date May 2019
00015 */
00016 
00017 class Begin
00018 {
00019 public:
00020 
00021     /**Constructor*/
00022     Begin();
00023     /**Destructor*/
00024     ~Begin();
00025     /**
00026     *@brief Initialise all parameters of the Begin
00027     */
00028     void init();
00029     /**
00030     *@brief Draw the bird, wall1 and live scores
00031     *@param lcd, pad
00032     *@returns The number to test whether the bird crash the wall1
00033     *@details Use the method to use function within N5110.h and Gamepad.h file
00034     */
00035     int draw(N5110 &lcd, Gamepad &pad);
00036     /**
00037     *@brief Get the live score
00038     *@param lcd
00039     *@return The live score
00040     */
00041     int get_score(N5110 &lcd);
00042 
00043 private:
00044     
00045     int _m;
00046     int _s;
00047     int _a1;
00048     int _b1;
00049     int _a2;
00050     int _b2;
00051     int _a3;
00052     int _b3;
00053     int _h;
00054     Bird _Bird;
00055     Wall1 _Wall1;
00056 };
00057 
00058 #endif
00059 
00060