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
Fork of el17zl by
Ppl/Ppl.h
- Committer:
- franklzw
- Date:
- 2019-04-28
- Revision:
- 11:f5d0ea7e4b74
- Parent:
- 6:6b083e22cb53
- Child:
- 13:5930f0e5889d
File content as of revision 11:f5d0ea7e4b74:
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
/** Ppl Class
@author Zhenwen liao, University of Leeds
@brief Controls the Ppl in the Sokoban game
@date 04 2019
*/
class Ppl
{
public:
Ppl();
~Ppl();
void init(int x0, int y0);
void draw(N5110 &lcd);
void update(int bb,int ba,int bx,int by,int temp,int barrier_x,int barrier_y);
/// accessors and mutators
bool hold_beside_barrier(int barrier_x,int barrier_y);
void move_ppl(int bb,int ba,int bx,int by);
void hold_ppl_box_touching(int temp);
void hold_ppl_against_wall();
Vector2D get_pos();
void set_pos(Vector2D p);
private:
// position of the ppl
int _x;
int _y;
};
