BastatDoreau / Mbed 2 deprecated MoveYourTetris

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

include/cMatrice.h

Committer:
clementdoreau
Date:
2016-04-07
Revision:
10:9ef3f520ff6c
Parent:
9:6f3d8b714a59
Child:
11:c37922a0a915

File content as of revision 10:9ef3f520ff6c:

#ifndef CMATRICE_H
#define CMATRICE_H

#include "cForme.h"
#include <vector>
#include "mbed.h"

// Déclaration de la classe Matrice

class cMatrice {
private:
	cForme * _pForme;
	unsigned char ** _matrice;
	unsigned char _col;
	unsigned char _lig;
	////////////////////////////////////////////////////////
	// Gestion des collisions aux bords
	////////////////////////////////////////////////////////
	bool _collisionBordGauche;
	bool _collisionBordDroit;
	bool _collisionBordBas;
	void controleCollisionBords();
	////////////////////////////////////////////////////////
	// Gestion des collisions aux pièces
	////////////////////////////////////////////////////////
protected:
public:
// CONSTRUCTEUR
	cMatrice();
	cMatrice(unsigned char, unsigned char);

// DESTRUCTEUR
	virtual ~cMatrice();

// GETTER
	unsigned char getValTab(unsigned char, unsigned char);
	unsigned char getCol();
	unsigned char getLig();
// SETTER
	void setCol(unsigned char);
	void setLig(unsigned char);
// METHODES
	int updateMatrice();
	void afficherForme(cForme * f, unsigned char c);
	void clear();
};



#endif // CMATRICE_H