
yumaowei 201377547
Dependencies: mbed ELEC2645_Project_el17my
predators/Predator.h@2:5e54476c518f, 2020-05-26 (annotated)
- Committer:
- yumaowei
- Date:
- Tue May 26 07:24:21 2020 +0000
- Revision:
- 2:5e54476c518f
Final Submission. I have read and agreed with Statement of Academic Integrity.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yumaowei | 2:5e54476c518f | 1 | #ifndef PREDATOR_H |
yumaowei | 2:5e54476c518f | 2 | #define PREDATOR_H |
yumaowei | 2:5e54476c518f | 3 | |
yumaowei | 2:5e54476c518f | 4 | #include "mbed.h" |
yumaowei | 2:5e54476c518f | 5 | #include "LCD.h" |
yumaowei | 2:5e54476c518f | 6 | #include "Gamepad.h" |
yumaowei | 2:5e54476c518f | 7 | /** Predator Class |
yumaowei | 2:5e54476c518f | 8 | @author Maowei Yu, University of Leeds |
yumaowei | 2:5e54476c518f | 9 | @Description: The class controls the predator component of the game |
yumaowei | 2:5e54476c518f | 10 | @date May 2020 |
yumaowei | 2:5e54476c518f | 11 | */ |
yumaowei | 2:5e54476c518f | 12 | class Predator |
yumaowei | 2:5e54476c518f | 13 | { |
yumaowei | 2:5e54476c518f | 14 | public: |
yumaowei | 2:5e54476c518f | 15 | |
yumaowei | 2:5e54476c518f | 16 | Predator(); |
yumaowei | 2:5e54476c518f | 17 | ~Predator(); |
yumaowei | 2:5e54476c518f | 18 | void init(int x,int radius); |
yumaowei | 2:5e54476c518f | 19 | void draw(LCD &lcd); |
yumaowei | 2:5e54476c518f | 20 | void update(Direction pred,float mag); |
yumaowei | 2:5e54476c518f | 21 | void add_points(); |
yumaowei | 2:5e54476c518f | 22 | int get_points(); |
yumaowei | 2:5e54476c518f | 23 | POS2D get_pos(); |
yumaowei | 2:5e54476c518f | 24 | |
yumaowei | 2:5e54476c518f | 25 | private: |
yumaowei | 2:5e54476c518f | 26 | |
yumaowei | 2:5e54476c518f | 27 | |
yumaowei | 2:5e54476c518f | 28 | int _radius; |
yumaowei | 2:5e54476c518f | 29 | int _x; |
yumaowei | 2:5e54476c518f | 30 | int _y; |
yumaowei | 2:5e54476c518f | 31 | int _speed; |
yumaowei | 2:5e54476c518f | 32 | int _point; |
yumaowei | 2:5e54476c518f | 33 | |
yumaowei | 2:5e54476c518f | 34 | }; |
yumaowei | 2:5e54476c518f | 35 | #endif |