![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
testing documentation
Dependencies: mbed ll16j23s_test_docs
Food/Food.h@7:dd84e0fab346, 2020-05-24 (annotated)
- Committer:
- JoeShotton
- Date:
- Sun May 24 22:18:55 2020 +0000
- Revision:
- 7:dd84e0fab346
- Parent:
- 5:06fa7674622a
- Child:
- 8:bcc3403d7e79
Menu system functions implemented, although not fully working together. Map draw functions finished
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JoeShotton | 3:fcd6d70e9694 | 1 | #ifndef FOOD_H |
JoeShotton | 3:fcd6d70e9694 | 2 | #define FOOD_H |
JoeShotton | 3:fcd6d70e9694 | 3 | |
JoeShotton | 3:fcd6d70e9694 | 4 | #include "mbed.h" |
JoeShotton | 3:fcd6d70e9694 | 5 | #include "N5110.h" |
JoeShotton | 3:fcd6d70e9694 | 6 | #include "Gamepad.h" |
JoeShotton | 5:06fa7674622a | 7 | #include "FXOS8700CQ.h" |
JoeShotton | 3:fcd6d70e9694 | 8 | |
JoeShotton | 3:fcd6d70e9694 | 9 | class Food |
JoeShotton | 3:fcd6d70e9694 | 10 | { |
JoeShotton | 5:06fa7674622a | 11 | |
JoeShotton | 3:fcd6d70e9694 | 12 | public: |
JoeShotton | 3:fcd6d70e9694 | 13 | |
JoeShotton | 3:fcd6d70e9694 | 14 | Food(); |
JoeShotton | 3:fcd6d70e9694 | 15 | ~Food(); |
JoeShotton | 3:fcd6d70e9694 | 16 | |
JoeShotton | 5:06fa7674622a | 17 | void init(FXOS8700CQ &mag); |
JoeShotton | 7:dd84e0fab346 | 18 | void rand_pos(Gamepad &pad); |
JoeShotton | 4:ea3fa51c4386 | 19 | void draw(N5110 &lcd, int &_frame); |
JoeShotton | 4:ea3fa51c4386 | 20 | void snake_food_collision(); |
JoeShotton | 4:ea3fa51c4386 | 21 | void do_food(N5110 &lcd); |
JoeShotton | 3:fcd6d70e9694 | 22 | |
JoeShotton | 3:fcd6d70e9694 | 23 | int _x; |
JoeShotton | 3:fcd6d70e9694 | 24 | int _y; |
JoeShotton | 4:ea3fa51c4386 | 25 | |
JoeShotton | 4:ea3fa51c4386 | 26 | private: |
JoeShotton | 4:ea3fa51c4386 | 27 | |
JoeShotton | 4:ea3fa51c4386 | 28 | int _frame; |
JoeShotton | 5:06fa7674622a | 29 | float _values; |
JoeShotton | 5:06fa7674622a | 30 | float _seed; |
JoeShotton | 5:06fa7674622a | 31 | |
JoeShotton | 3:fcd6d70e9694 | 32 | }; |
JoeShotton | 3:fcd6d70e9694 | 33 | #endif |