![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
demo
Dependencies: mbed Gamepad N5110
Diff: rocket/rocket.h
- Revision:
- 0:ba32cfe0051e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rocket/rocket.h Thu May 14 12:57:32 2020 +0000 @@ -0,0 +1,50 @@ +#ifndef ROCKET_H +#define ROCKET_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +class rocket +{ +public: + + rocket(); + ~rocket(); + + void init(int x); + /** + * @returns x posititon of rocket + * @brief Resets the position of rocket + */ + void draw(N5110 &lcd); + // accessors and mutators + /** + * @returns The new coordinate of rocket + * @brief Updates the position of rocket + */ + void lose_score(); + // accessors and mutators + /** + * @returns The score of lossing + * @brief Updates the score of rocket + */ + int get_final_score(); + /** + * @returns The new coordinate of foods + * @brief Updates the position of foods + */ + Vector2D get_pos(); + void replace(Direction d,float mag,Vector2D mapped_coord); + void add_score(); + + +private: + int _size; + int _x; + int _y; + int _scale; + int _score; + int _easter; + +}; +#endif \ No newline at end of file