![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
testing documentation
Dependencies: mbed ll16j23s_test_docs
Food/Food.h@4:ea3fa51c4386, 2020-05-23 (annotated)
- Committer:
- JoeShotton
- Date:
- Sat May 23 15:31:30 2020 +0000
- Revision:
- 4:ea3fa51c4386
- Parent:
- 3:fcd6d70e9694
- Child:
- 5:06fa7674622a
Food and snake collisions implemented, still buggy
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 | 3:fcd6d70e9694 | 7 | |
JoeShotton | 3:fcd6d70e9694 | 8 | class Food |
JoeShotton | 3:fcd6d70e9694 | 9 | { |
JoeShotton | 3:fcd6d70e9694 | 10 | public: |
JoeShotton | 3:fcd6d70e9694 | 11 | |
JoeShotton | 3:fcd6d70e9694 | 12 | Food(); |
JoeShotton | 3:fcd6d70e9694 | 13 | ~Food(); |
JoeShotton | 3:fcd6d70e9694 | 14 | |
JoeShotton | 3:fcd6d70e9694 | 15 | void init(); |
JoeShotton | 4:ea3fa51c4386 | 16 | void rand_pos(Gamepad &pad, int &_x, int &_y); |
JoeShotton | 4:ea3fa51c4386 | 17 | void draw(N5110 &lcd, int &_frame); |
JoeShotton | 4:ea3fa51c4386 | 18 | void snake_food_collision(); |
JoeShotton | 4:ea3fa51c4386 | 19 | void do_food(N5110 &lcd); |
JoeShotton | 3:fcd6d70e9694 | 20 | |
JoeShotton | 3:fcd6d70e9694 | 21 | int _x; |
JoeShotton | 3:fcd6d70e9694 | 22 | int _y; |
JoeShotton | 4:ea3fa51c4386 | 23 | |
JoeShotton | 4:ea3fa51c4386 | 24 | private: |
JoeShotton | 4:ea3fa51c4386 | 25 | |
JoeShotton | 4:ea3fa51c4386 | 26 | int _frame; |
JoeShotton | 3:fcd6d70e9694 | 27 | |
JoeShotton | 3:fcd6d70e9694 | 28 | }; |
JoeShotton | 3:fcd6d70e9694 | 29 | #endif |