ELEC2645 (2018/19) / Mbed 2 deprecated el17zl

Dependencies:   mbed

Fork of el17zl by Zhenwen Liao

PushingEngine/PushingEngine.h

Committer:
franklzw
Date:
2019-03-24
Revision:
2:9f0d9516a6cd
Child:
4:750d3f9b54de

File content as of revision 2:9f0d9516a6cd:

#ifndef PUSHINGENGINE_H
#define PUSHINGENGINE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Ppl.h"
#include "Box.h"



class PushingEngine
{

public:
    PushingEngine();
    ~PushingEngine();

    void init(int box1_x,int box1_y,int box2_x,int box2_y,int ppl_x,int ppl_y,int cross1_x,int corss2_x,int cross1_x,int cross2_y);
    void read_input(Gamepad &pad);
    void update(Gamepad &pad);
    void draw(N5110 &lcd);

private:

    //void check_wall_collision(Gamepad &pad);
    //void check_paddle_collisions(Gamepad &pad);
    void check_goal(Gamepad &pad);
    void print_scores(N5110 &lcd);

    Box _b1;
    Box _b2;

    // positions of the Boxes
    int _b1x;
    int _b2x;
    int _b1y;
    int _b2y;

    Ppl _ppl;

    // poitions of the ppl
    int _pplx;
    int _pply;

    Cross _c1;
    Cross _c2;

    int _c1x;
    int _c2x;
    int _c1y;
    int _c2y;

    Direction _d;
    float _mag;

};

#endif