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: People/People.h
- Revision:
- 33:7fedd8029473
- Child:
- 34:85ccc16f24d2
diff -r c006a9882778 -r 7fedd8029473 People/People.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/People/People.h Thu May 14 22:41:16 2020 +0000
@@ -0,0 +1,52 @@
+#ifndef PEOPLE_H
+#define PEOPLE_H
+
+// Included libraries ----------------------------------------------------------
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Position.h"
+
+/** People class
+ * @brief Draws people and moves them if collected by aliens
+ * @author Benjamin Evans, University of Leeds
+ * @date May 2020
+ */
+class People: public Position {
+ public:
+ /** Constructor */
+ People();
+
+ /** Destructor */
+ ~People();
+
+ /** Initalises Alien
+ * @param position_x_start @details Random x start pos of people
+ */
+ void init(Gamepad &pad, int position_x_start);
+
+ /** Draws the people
+ * @param lcd @details N5110 object
+ */
+ void draw_people(N5110 &lcd, Direction d_);
+
+ // Accessors and mutators --------------------------------------------------
+
+
+ private:
+ // Function prototypes -----------------------------------------------------
+
+ /** Calulates the people movement depeding on spaceship positions and
+ * joystick input
+ * @param d_ @details : Direction object of joystick
+ * @retrun integer @details move alien value for alien draw function
+ */
+ int calc_people_movement(Direction d_);
+
+ // Variables ---------------------------------------------------------------
+
+
+
+};
+
+#endif
\ No newline at end of file