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
Rock/Rock.h
- Committer:
- josh_ohara
- Date:
- 2020-05-17
- Revision:
- 31:27c938ec2a11
- Parent:
- 15:dde4ce4bf7fe
- Child:
- 39:5d4277548303
File content as of revision 31:27c938ec2a11:
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
class Rock
{
public:
void init(int x, int y, int size); //sets private variables to inputs
void render(N5110 &lcd); //draws rock
//accessors and mutators//
Vector2D get_position(); //returns position of the rock
void set_life(bool x); //sets the life variable of the rock
bool get_life(); //returns the life variable of the rock
private:
int _x; //x position of the rock
int _y; //y position of the rock
bool _life; //life variable
int _size; //size of the rock
};