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 APDS_9960 mbed-rtos
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