Mini projet LOO

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

Home du projet

Committer:
clementdoreau
Date:
Fri Mar 25 08:21:57 2016 +0000
Revision:
0:b2acac6abf2b
Child:
1:ab5f440f4156
Classe forme cr??e

Who changed what in which revision?

UserRevisionLine numberNew contents of line
clementdoreau 0:b2acac6abf2b 1 #include "cForme.h"
clementdoreau 0:b2acac6abf2b 2
clementdoreau 0:b2acac6abf2b 3 // Définition de la classe mère Forme
clementdoreau 0:b2acac6abf2b 4
clementdoreau 0:b2acac6abf2b 5 // CONSTRUCTEURS
clementdoreau 0:b2acac6abf2b 6 cForme::cForme()
clementdoreau 0:b2acac6abf2b 7 {
clementdoreau 0:b2acac6abf2b 8 _orientation = 0;
clementdoreau 0:b2acac6abf2b 9 _positionX = 0;
clementdoreau 0:b2acac6abf2b 10 _positionY = 0;
clementdoreau 0:b2acac6abf2b 11 }
clementdoreau 0:b2acac6abf2b 12
clementdoreau 0:b2acac6abf2b 13 cForme::cForme(unsigned char o, unsigned char x, unsigned char y)
clementdoreau 0:b2acac6abf2b 14 {
clementdoreau 0:b2acac6abf2b 15 _orientation = o;
clementdoreau 0:b2acac6abf2b 16 _positionX = x;
clementdoreau 0:b2acac6abf2b 17 _positionY = y;
clementdoreau 0:b2acac6abf2b 18 }
clementdoreau 0:b2acac6abf2b 19
clementdoreau 0:b2acac6abf2b 20 // GETTERS
clementdoreau 0:b2acac6abf2b 21 unsigned char cForme::getOrientation()
clementdoreau 0:b2acac6abf2b 22 {
clementdoreau 0:b2acac6abf2b 23 return _orientation;
clementdoreau 0:b2acac6abf2b 24 }
clementdoreau 0:b2acac6abf2b 25
clementdoreau 0:b2acac6abf2b 26 unsigned char cForme::getPositionX()
clementdoreau 0:b2acac6abf2b 27 {
clementdoreau 0:b2acac6abf2b 28 return _positionX;
clementdoreau 0:b2acac6abf2b 29 }
clementdoreau 0:b2acac6abf2b 30 unsigned char cForme::getPositionY()
clementdoreau 0:b2acac6abf2b 31 {
clementdoreau 0:b2acac6abf2b 32 return _positionY;
clementdoreau 0:b2acac6abf2b 33 }
clementdoreau 0:b2acac6abf2b 34
clementdoreau 0:b2acac6abf2b 35 // SETTERS
clementdoreau 0:b2acac6abf2b 36 void cForme::setOrientation(unsigned char orientation)
clementdoreau 0:b2acac6abf2b 37 {
clementdoreau 0:b2acac6abf2b 38 _orientation = orientation;
clementdoreau 0:b2acac6abf2b 39 }
clementdoreau 0:b2acac6abf2b 40
clementdoreau 0:b2acac6abf2b 41 void cForme::setPositionX(unsigned char x)
clementdoreau 0:b2acac6abf2b 42 {
clementdoreau 0:b2acac6abf2b 43 _positionX = x;
clementdoreau 0:b2acac6abf2b 44 }
clementdoreau 0:b2acac6abf2b 45
clementdoreau 0:b2acac6abf2b 46 void cForme::setPositionY(unsigned char y)
clementdoreau 0:b2acac6abf2b 47 {
clementdoreau 0:b2acac6abf2b 48 _positionY = y;
clementdoreau 0:b2acac6abf2b 49 }
clementdoreau 0:b2acac6abf2b 50
clementdoreau 0:b2acac6abf2b 51 void cForme::afficherForme()
clementdoreau 0:b2acac6abf2b 52 {
clementdoreau 0:b2acac6abf2b 53 //
clementdoreau 0:b2acac6abf2b 54 };