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
Avenger/Avenger.h@12:660458c41c8e, 2019-05-09 (annotated)
- Committer:
- davidwst421
- Date:
- Thu May 09 04:26:16 2019 +0000
- Revision:
- 12:660458c41c8e
- Parent:
- 7:193c0fd7afdd
- Child:
- 14:13e82f720bea
Add easter egg
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
davidwst421 | 0:fd8eda608206 | 1 | #ifndef AVENGER_H |
davidwst421 | 0:fd8eda608206 | 2 | #define AVENGER_H |
davidwst421 | 0:fd8eda608206 | 3 | |
davidwst421 | 0:fd8eda608206 | 4 | #include "mbed.h" |
davidwst421 | 0:fd8eda608206 | 5 | #include "N5110.h" |
davidwst421 | 0:fd8eda608206 | 6 | #include "Gamepad.h" |
davidwst421 | 0:fd8eda608206 | 7 | |
davidwst421 | 0:fd8eda608206 | 8 | class Avenger |
davidwst421 | 0:fd8eda608206 | 9 | { |
davidwst421 | 0:fd8eda608206 | 10 | public: |
davidwst421 | 0:fd8eda608206 | 11 | |
davidwst421 | 0:fd8eda608206 | 12 | Avenger(); |
davidwst421 | 0:fd8eda608206 | 13 | ~Avenger(); |
davidwst421 | 7:193c0fd7afdd | 14 | void init(int x); |
davidwst421 | 0:fd8eda608206 | 15 | void draw(N5110 &lcd); |
davidwst421 | 6:a0f3dbbc8d33 | 16 | void update(Direction d,float mag,Vector2D mapped_coord); |
davidwst421 | 0:fd8eda608206 | 17 | void add_score(); |
davidwst421 | 0:fd8eda608206 | 18 | void lose_score(); |
davidwst421 | 0:fd8eda608206 | 19 | int get_score(); |
davidwst421 | 0:fd8eda608206 | 20 | Vector2D get_pos(); |
davidwst421 | 0:fd8eda608206 | 21 | |
davidwst421 | 0:fd8eda608206 | 22 | private: |
davidwst421 | 0:fd8eda608206 | 23 | |
davidwst421 | 0:fd8eda608206 | 24 | int _size; |
davidwst421 | 0:fd8eda608206 | 25 | int _x; |
davidwst421 | 0:fd8eda608206 | 26 | int _y; |
davidwst421 | 0:fd8eda608206 | 27 | int _scale; |
davidwst421 | 0:fd8eda608206 | 28 | int _score; |
davidwst421 | 12:660458c41c8e | 29 | int _easter; |
davidwst421 | 0:fd8eda608206 | 30 | |
davidwst421 | 0:fd8eda608206 | 31 | }; |
davidwst421 | 0:fd8eda608206 | 32 | #endif |