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.
Brick/Brick.h
- Committer:
- jamesheavey
- Date:
- 2019-05-06
- Revision:
- 86:01f33d94e496
- Parent:
- 66:5561cbdfb1b1
- Child:
- 88:ddb9fe0db91b
File content as of revision 86:01f33d94e496:
#ifndef BRICK_H
#define BRICK_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#define BRICK_WIDTH 12
#define BRICK_HEIGHT 4
/* Ball Class
@author James Heavey, University of Leeds
@brief Controls the bricks in the Breakout game
@date May 2019
*/
class Brick
{
public:
Brick();
~Brick();
void init(int x,int y, int lives);
void draw(N5110 &lcd);
bool hit();
int get_x();
int get_y();
void set_posx(int x);
void set_posy(int y);
void reset_lives(int inc);
private:
int _height;
int _width;
int _x;
int _y;
int _lives;
int _base_lives;
};
#endif