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
Bat/Bat.h@26:6427f09cf8d3, 2019-05-01 (annotated)
- Committer:
- shahidsajid
- Date:
- Wed May 01 11:56:36 2019 +0000
- Revision:
- 26:6427f09cf8d3
- Parent:
- 21:a0904159e183
- Child:
- 28:d0b0a64a832d
Documented the UX class
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| shahidsajid | 4:55a0509c4874 | 1 | #ifndef BAT_H |
| shahidsajid | 4:55a0509c4874 | 2 | #define BAT_H |
| shahidsajid | 4:55a0509c4874 | 3 | |
| shahidsajid | 4:55a0509c4874 | 4 | #include "mbed.h" |
| shahidsajid | 4:55a0509c4874 | 5 | #include "N5110.h" |
| shahidsajid | 4:55a0509c4874 | 6 | #include "Gamepad.h" |
| shahidsajid | 21:a0904159e183 | 7 | #include "UX.h" |
| shahidsajid | 4:55a0509c4874 | 8 | |
| shahidsajid | 26:6427f09cf8d3 | 9 | /** Bat Class |
| shahidsajid | 26:6427f09cf8d3 | 10 | @author Shahid Zubin Sajid, |
| shahidsajid | 26:6427f09cf8d3 | 11 | @brief Bat charactersitics and checks for collisions |
| shahidsajid | 4:55a0509c4874 | 12 | @date Febraury 2017 |
| shahidsajid | 4:55a0509c4874 | 13 | */ |
| shahidsajid | 4:55a0509c4874 | 14 | class Bat |
| shahidsajid | 4:55a0509c4874 | 15 | { |
| shahidsajid | 4:55a0509c4874 | 16 | |
| shahidsajid | 4:55a0509c4874 | 17 | public: |
| shahidsajid | 4:55a0509c4874 | 18 | Bat(); |
| shahidsajid | 4:55a0509c4874 | 19 | ~Bat(); |
| shahidsajid | 4:55a0509c4874 | 20 | void init(int x,int y); |
| shahidsajid | 4:55a0509c4874 | 21 | void draw(N5110 &lcd); |
| shahidsajid | 26:6427f09cf8d3 | 22 | void reset(); |
| shahidsajid | 26:6427f09cf8d3 | 23 | |
| shahidsajid | 26:6427f09cf8d3 | 24 | /// accessors and mutators |
| shahidsajid | 21:a0904159e183 | 25 | int get_hitBall(UX &ux); |
| shahidsajid | 21:a0904159e183 | 26 | int get_loft_ball(UX &ux); |
| shahidsajid | 14:122eaa3b7a50 | 27 | |
| shahidsajid | 4:55a0509c4874 | 28 | |
| shahidsajid | 4:55a0509c4874 | 29 | private: |
| shahidsajid | 14:122eaa3b7a50 | 30 | |
| shahidsajid | 14:122eaa3b7a50 | 31 | |
| shahidsajid | 6:3e50f2cf4366 | 32 | Gamepad batPad; |
| shahidsajid | 6:3e50f2cf4366 | 33 | int _hitBall; |
| shahidsajid | 13:924891519a95 | 34 | int _loft_ball; |
| shahidsajid | 4:55a0509c4874 | 35 | int d; |
| shahidsajid | 26:6427f09cf8d3 | 36 | int _bat_x; |
| shahidsajid | 26:6427f09cf8d3 | 37 | int _bat_y; |
| shahidsajid | 4:55a0509c4874 | 38 | }; |
| shahidsajid | 4:55a0509c4874 | 39 | #endif |