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.
Dependencies: mbed
Head/Head.h@5:e0f08e8022de, 2020-05-28 (annotated)
- Committer:
- el18lg
- Date:
- Thu May 28 16:29:55 2020 +0000
- Revision:
- 5:e0f08e8022de
- Parent:
- 4:748b3e0062f6
- Child:
- 9:f3259d652208
Tail is complete for now, need to build food class and implement it with the rest of my classes;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el18lg | 3:beb0cc405b1e | 1 | #ifndef HEAD_H |
el18lg | 3:beb0cc405b1e | 2 | #define HEAD_H |
el18lg | 3:beb0cc405b1e | 3 | |
el18lg | 3:beb0cc405b1e | 4 | #include "mbed.h" |
el18lg | 3:beb0cc405b1e | 5 | #include "Gamepad.h" |
el18lg | 3:beb0cc405b1e | 6 | #include "N5110.h" |
el18lg | 3:beb0cc405b1e | 7 | |
el18lg | 3:beb0cc405b1e | 8 | class Head |
el18lg | 3:beb0cc405b1e | 9 | { |
el18lg | 3:beb0cc405b1e | 10 | public: |
el18lg | 3:beb0cc405b1e | 11 | |
el18lg | 3:beb0cc405b1e | 12 | Head(); |
el18lg | 3:beb0cc405b1e | 13 | ~Head(); |
el18lg | 4:748b3e0062f6 | 14 | void init(int _x, int _y, int _length, int _speed); |
el18lg | 3:beb0cc405b1e | 15 | void draw(N5110 &lcd); |
el18lg | 3:beb0cc405b1e | 16 | void update(); |
el18lg | 5:e0f08e8022de | 17 | void update(enum Direction d, float mag); |
el18lg | 3:beb0cc405b1e | 18 | Vector2D get_pos(); |
el18lg | 4:748b3e0062f6 | 19 | |
el18lg | 3:beb0cc405b1e | 20 | |
el18lg | 3:beb0cc405b1e | 21 | private: |
el18lg | 3:beb0cc405b1e | 22 | Gamepad pad; |
el18lg | 4:748b3e0062f6 | 23 | |
el18lg | 3:beb0cc405b1e | 24 | int _x; |
el18lg | 3:beb0cc405b1e | 25 | int _y; |
el18lg | 3:beb0cc405b1e | 26 | int _length; |
el18lg | 3:beb0cc405b1e | 27 | int _speed; |
el18lg | 3:beb0cc405b1e | 28 | }; |
el18lg | 3:beb0cc405b1e | 29 | #endif |