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.
Paddle/Paddle.h
- Committer:
- jamesheavey
- Date:
- 2019-05-08
- Revision:
- 111:4848c399fae0
- Parent:
- 91:c01a736fb0d9
- Child:
- 114:280903dd7e06
File content as of revision 111:4848c399fae0:
#ifndef PADDLE_H #define PADDLE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #define PADDLE_WIDTH 15 #define PADDLE_HEIGHT 2 /* Ball Class @author James Heavey, University of Leeds @brief Controls the paddle in the Breakout game @date May 2019 */ class Paddle { public: Paddle(); ~Paddle(); void init(int x,int height,int width); void draw(N5110 &lcd); void update(Direction d,float mag); void lose_life(); Vector2D get_pos(); int get_lives(); void reset_lives(); void set_tilt(); void set_joy(); void recentre(); void set_sens(float sens); private: int _height; int _width; int _x; int _y; int _speed; int _score; int _lives; float _sens; bool _tilt; }; #endif