Mini projet LOO

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

Home du projet

src/cLed.cpp

Committer:
clementdoreau
Date:
2016-04-07
Revision:
10:9ef3f520ff6c
Parent:
9:6f3d8b714a59
Child:
29:95469b25e187

File content as of revision 10:9ef3f520ff6c:

#include "cLed.h"

// Définition de la classe Led

// CONSTRUCTEURS

cLed::cLed() {
	_positionX = 0;
	_positionY = 0;
	_couleur = 0x00;
}

cLed::cLed(unsigned char x, unsigned char y) {
	_positionX = x;
	_positionY = y;
}

cLed::cLed(unsigned char x, unsigned char y, unsigned char c) {
	_positionX = x;
	_positionY = y;
	_couleur = c;
}

// GETTERS

unsigned char cLed::getPositionX() {
	return _positionX;
}
unsigned char cLed::getPositionY() {
	return _positionY;
}

unsigned char cLed::getOldPositionX(){
	return _oldPositionX;
}

unsigned char cLed::getOldPositionY(){
	return _oldPositionY;
}

unsigned char cLed::getCouleur() {
	return _couleur;
}


// SETTER

void cLed::setPositionX(unsigned char x) {
	_positionX = x;
}

void cLed::setPositionY(unsigned char y) {
	_positionY = y;
}

void cLed::setOldPositionX(unsigned char x){
	_oldPositionX = x;
}

void cLed::setOldPositionY(unsigned char y){
	_oldPositionY = y;
}

void cLed::setCouleur(unsigned char c) {
	_couleur = c;
}