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
Minerengine.h
- Committer:
- el17arm
- Date:
- 2019-03-21
- Revision:
- 4:b92da6a09c8b
- Parent:
- 3:d27ee2440829
- Child:
- 6:866281ce2b44
File content as of revision 4:b92da6a09c8b:
#ifndef MINERENGINE_H
#define MINERENGINE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
const int miner_right[60] = {
0,0,0,1,1,
0,1,1,1,1,
0,1,0,1,0,
0,1,1,1,1,
0,1,1,1,0,
0,0,1,0,0,
1,1,1,1,1,
1,1,1,1,1,
1,1,1,1,1,
0,1,1,1,0,
0,1,0,1,0,
0,1,1,1,1,
};
const int miner_left[60] = {
1,1,0,0,0,
1,1,1,1,0,
0,1,0,1,0,
1,1,1,1,0,
0,1,1,1,0,
0,0,1,0,0,
1,1,1,1,1,
1,1,1,1,1,
1,1,1,1,1,
0,1,1,1,0,
0,1,0,1,0,
1,1,1,1,0,
};
class Minerengine
{
public:
Minerengine();
~Minerengine();
void read_direction(Gamepad &pad);
void miner_move(N5110 &lcd, Gamepad &pad);
void miner_draw(N5110 &lcd);
void miner_gravity(N5110 &lcd);
void miner_jump(N5110 &lcd, Gamepad &pad);
private:
Direction _d;
int _direction;
int _jump;
int _x;
int _y;
};
#endif