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@4:55a0509c4874, 2019-04-16 (annotated)
- Committer:
- shahidsajid
- Date:
- Tue Apr 16 09:48:37 2019 +0000
- Revision:
- 4:55a0509c4874
- Child:
- 6:3e50f2cf4366
Initialised the Bat 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 | 4:55a0509c4874 | 7 | |
| shahidsajid | 4:55a0509c4874 | 8 | /** Ball Class |
| shahidsajid | 4:55a0509c4874 | 9 | @author Dr Craig A. Evans, University of Leeds |
| shahidsajid | 4:55a0509c4874 | 10 | @brief Controls the ball in the Pong game |
| shahidsajid | 4:55a0509c4874 | 11 | @date Febraury 2017 |
| shahidsajid | 4:55a0509c4874 | 12 | */ |
| shahidsajid | 4:55a0509c4874 | 13 | class Bat |
| shahidsajid | 4:55a0509c4874 | 14 | { |
| shahidsajid | 4:55a0509c4874 | 15 | |
| shahidsajid | 4:55a0509c4874 | 16 | public: |
| shahidsajid | 4:55a0509c4874 | 17 | Bat(); |
| shahidsajid | 4:55a0509c4874 | 18 | ~Bat(); |
| shahidsajid | 4:55a0509c4874 | 19 | void init(int x,int y); |
| shahidsajid | 4:55a0509c4874 | 20 | void draw(N5110 &lcd); |
| shahidsajid | 4:55a0509c4874 | 21 | void update(); |
| shahidsajid | 4:55a0509c4874 | 22 | /// accessors and mutators |
| shahidsajid | 4:55a0509c4874 | 23 | //Vector2D get_velocity(); |
| shahidsajid | 4:55a0509c4874 | 24 | //Vector2D get_pos(); |
| shahidsajid | 4:55a0509c4874 | 25 | //void set_pos(Vector2D p); |
| shahidsajid | 4:55a0509c4874 | 26 | //void start(N5110 &lcd); |
| shahidsajid | 4:55a0509c4874 | 27 | //void get_direction(Gamepad &pad); |
| shahidsajid | 4:55a0509c4874 | 28 | |
| shahidsajid | 4:55a0509c4874 | 29 | private: |
| shahidsajid | 4:55a0509c4874 | 30 | //Gamepad pad; |
| shahidsajid | 4:55a0509c4874 | 31 | /*struct Fielder{ |
| shahidsajid | 4:55a0509c4874 | 32 | int x; |
| shahidsajid | 4:55a0509c4874 | 33 | int y; |
| shahidsajid | 4:55a0509c4874 | 34 | int position; |
| shahidsajid | 4:55a0509c4874 | 35 | }; |
| shahidsajid | 4:55a0509c4874 | 36 | */ |
| shahidsajid | 4:55a0509c4874 | 37 | |
| shahidsajid | 4:55a0509c4874 | 38 | //Vector2D _velocity; |
| shahidsajid | 4:55a0509c4874 | 39 | //Fielder field[5]; |
| shahidsajid | 4:55a0509c4874 | 40 | //Direction _d; |
| shahidsajid | 4:55a0509c4874 | 41 | int d; |
| shahidsajid | 4:55a0509c4874 | 42 | int _size; |
| shahidsajid | 4:55a0509c4874 | 43 | int _x; |
| shahidsajid | 4:55a0509c4874 | 44 | int _y; |
| shahidsajid | 4:55a0509c4874 | 45 | }; |
| shahidsajid | 4:55a0509c4874 | 46 | #endif |