Adam Baker 201166301
Dependencies: mbed Gamepad N5110
BlockheadEngine/BlockheadEngine.h
- Committer:
- adambakerwa
- Date:
- 2019-05-06
- Revision:
- 38:51ed5820ffe5
- Parent:
- 36:6f452777b9ce
- Child:
- 41:4b20f909bbcb
File content as of revision 38:51ed5820ffe5:
#ifndef BLOCKHEADENGINE_H #define BLOCKHEADENGINE_H #include "mbed.h" #include "Gamepad.h" #include "N5110.h" #include "Blockhead.h" #include "Levels.h" #include "Animation.h" /** BlockheadEngine Class * @brief Class for controlling the main mechanics Blockhead character * @author Adam P. Baker */ class BlockheadEngine { public: /** *@brief Constructor */ BlockheadEngine(); /** *@brief Deconstructor */ ~BlockheadEngine(); /** *@brief Initialises variables in blockhead class and level class and _pos struct. */ void init(); /** *@brief Intialises variables in blockhead class and level class and _pos struck (except level number which it keeps the same) */ void continueInit(); /** *@brief runs the game 'blockhead' *@param lcd @brief class which controlls lcd screen *@param pad @breif class for working with the gamepad *@returns _gameover @brief (0 when blockhead alive, 1 once died) */ int playgame(N5110 &lcd, Gamepad &pad); /** *@bried sets highscore if new highest level reached *@retunrs _highscore */ int highscore(); private: Blockhead _blockhead; //blockhead class Levels _lev; //levels class Pos _pos; //_pos struct int _gameover; //_gameover flag (0 when alive, 1 onnce died) int _level; //what level blockhead is on int _highscore; //highest level reached }; #endif