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.
People/People.h
- Committer:
- evanso
- Date:
- 2020-05-14
- Revision:
- 33:7fedd8029473
- Child:
- 34:85ccc16f24d2
File content as of revision 33:7fedd8029473:
#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