BastatDoreau / Mbed 2 deprecated MoveYourTetris

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

include/cJeu.h

Committer:
Willheisen
Date:
2016-04-18
Revision:
24:9f3005f1ba96
Parent:
23:298a1314fc81
Child:
25:b59758a85ed3

File content as of revision 24:9f3005f1ba96:

#ifndef JEU_H
#define JEU_H

#include "SparkFun_APDS9960.h"
#include "cMatrice.h"
#include "cCarre.h"
#include "cZed.h"
#include "cEl.h"
#include "cTe.h"
#include "cLigne.h"
#include "cCollision.h"
#include "cSPI.h"
#include "cBoussole.h"
#include "rtos.h"

#define START_THREAD 1

class cJeu
{
    // ATTRIBUTS
    private:
    cMatrice *_mat;
    cForme *_ptrForme;
    cSPI _spi;
    unsigned char _score;
    cBoussole *_boussole;
    unsigned char *_detec;

    ////////////////////////////////////////////////////
    InterruptIn _interrupt(PinName pin);
    I2C *_i2c;
    SparkFun_APDS9960 *apds(I2C);
    public:
    // CONSTRUCTEURS
    cJeu();
    ////
    //cJeu(unsigned char, unsigned char);
    cJeu(unsigned char, unsigned char, PinName pin);

    // DESTRUCTEUR
    ~cJeu();
    // SETTERS
    void set_matrice(cMatrice *mat);
    void set_score(unsigned char sc);
    // GETTERS
    cMatrice* get_matrice();
    unsigned char get_score();
    unsigned char *getDetec();
    // METHODES
    void initialiser();
    void nouvellePiece();
    unsigned char ligneComplete();
    void nouvelleManche();
    int partieEnCours();
    void fin();
    void detectionMouvement(void const *args);    
};

#endif //JEU_H