ELEC2645 (2018/19) / Mbed 2 deprecated el17zl

Dependencies:   mbed

Fork of el17zl by Zhenwen Liao

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;
};