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: lib/GameEngine/GameEngine.h
- Revision:
- 21:1f44f5493c0d
- Parent:
- 12:50a7abf21f18
- Child:
- 22:d265f506446b
- Child:
- 34:8dbf401b9906
--- a/lib/GameEngine/GameEngine.h Wed May 08 23:46:49 2019 +0000 +++ b/lib/GameEngine/GameEngine.h Wed May 08 23:47:18 2019 +0000 @@ -1,10 +1,5 @@ #ifndef GAMEENGINE_H #define GAMEENGINE_H -/* -ELEC2645 Project -GameEngine.h -Class file for GameEngine in Donkey Kong game. -*/ #include "mbed.h" #include "N5110.h" @@ -13,19 +8,46 @@ #include "Barrel.h" #include "Banana.h" - +/** GameEngine Class +*@brief This class is running and contrling the main game functions. +*@author Kern Fowler +*@version 1.0 +*@date May 2019 +*/ -class GameEngine -{ - - public: +class GameEngine { - GameEngine(); +public: +/** GameEngine Constructor +@brief Builds my default GameEngine constructor. +@details This does not have any setup. +*/ +GameEngine(); +/** GameEngine Destructor +@brief Builds my default GameEngine destructor. +@details This does not have any setup. +*/ +~GameEngine(); +// Mutators - ~GameEngine(); - - void gameengine_run(Gamepad &pad, N5110 &lcd, Barrel &barrel, Banana &banana, Donkey &dky); - void gameengine_score(Gamepad &pad, N5110 &lcd, Banana &banana); +/** +*@brief Controls the main game. +*@param pad The Gamepad class is used. +*@param lcd The N5110 class is used. +*@param barrel The Barrel class is used. +*@param banana The Banana class is used. +*@param dky The Donkey class is used. +*@details Runs the main functions of the game in correct order. +*/ +void gameengine_run(Gamepad &pad, N5110 &lcd, Barrel &barrel, Banana &banana, Donkey &dky); +/** +*@brief Shows game over screen. +*@param pad The Gamepad class is used. +*@param lcd The N5110 class is used. +*@param banana The Banana class is used. +*@details Prints the gameover screen. Prints various text, including total player score. +*/ +void gameengine_score(Gamepad &pad, N5110 &lcd, Banana &banana); }; #endif \ No newline at end of file