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: GameEngine/GameEngine.h
- Revision:
- 8:dd1037c5435b
- Parent:
- 7:0af4ced868f5
- Child:
- 11:ab578a151f67
diff -r 0af4ced868f5 -r dd1037c5435b GameEngine/GameEngine.h
--- a/GameEngine/GameEngine.h Sat Apr 18 16:36:52 2020 +0000
+++ b/GameEngine/GameEngine.h Sun Apr 19 17:46:57 2020 +0000
@@ -5,12 +5,15 @@
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
+#include "Spaceship.h"
+#include "Map.h"
-/** Spaceship class
-@brief Draws and moves spaceship
+/** Game Engine class
+@brief Runs the different parts of the game
@author Benjamin Evans, University of Leeds
@date April 2020
*/
+
class GameEngine {
public:
@@ -20,13 +23,23 @@
/** Destructor */
~GameEngine();
- /** Initalises Spaceship */
- void init();
+ /** Initalises GameEngine
+ * @param lcd object, map object ,spaceship object,
+ */
+ void init(N5110 &lcd, Spaceship &spaceship, Map &map, Gamepad &pad,AnalogIn &adc);
-
+ /** Main gameplay loop that runs playable part of game
+ * @param lcd object, map object ,spaceship object, potentiometer object, pad object, potentiometer object
+ */
+ void gameplay_loop(N5110 &lcd, Spaceship &spaceship, Map &map, Gamepad &pad, AnalogIn &pot_1);
+ /** Moves map with spaceship movment
+ * @param spaceship object, gampad object,
+ */
+ void map_movement(Spaceship &spaceship, Gamepad &pad);
+
private:
-
+ int move_map_;
};
#endif
\ No newline at end of file