Mini projet LOO

Dependencies:   mbed APDS_9960 mbed-rtos

Dependents:   MoveYourTetris_OK

Home du projet

Revision:
29:95469b25e187
Parent:
20:921ffec1acb4
Child:
30:c647da947bd9
--- a/src/cEl.cpp	Wed Apr 20 14:18:18 2016 +0000
+++ b/src/cEl.cpp	Wed Apr 20 15:09:43 2016 +0000
@@ -19,16 +19,16 @@
     _Leds[2].setPositionY(_positionY - 1);
     _Leds[3].setPositionX(_positionX + 1);
     _Leds[3].setPositionY(_positionY - 1);
-    for(unsigned char i = 0; i<4; i++) {
+    for(unsigned int i = 0; i<4; i++) {
         _Leds[i].setOldPositionX(_Leds[i].getPositionX());
     }
-    for(unsigned char i = 0; i<4; i++) {
+    for(unsigned int i = 0; i<4; i++) {
         _Leds[i].setOldPositionY(_Leds[i].getPositionY());
     }
     _typeForme = 4;
 }
 
-cEl::cEl(unsigned char x, unsigned char y)
+cEl::cEl(unsigned int x, unsigned int y)
 {
     // variables à 0
     _positionX = x;
@@ -45,10 +45,10 @@
     _Leds[2].setPositionY(_positionY);
     _Leds[3].setPositionX(_positionX + 1);
     _Leds[3].setPositionY(_positionY);
-    for(unsigned char i = 0; i<4; i++) {
+    for(unsigned int i = 0; i<4; i++) {
         _Leds[i].setOldPositionX(_Leds[i].getPositionX());
     }
-    for(unsigned char i = 0; i<4; i++) {
+    for(unsigned int i = 0; i<4; i++) {
         _Leds[i].setOldPositionY(_Leds[i].getPositionY());
     }
     _typeForme = 4;
@@ -57,7 +57,7 @@
 void cEl::rotationHoraire()
 {
     // Sauvegarde des anciennes positions
-	for (unsigned char i = 0; i < 4; i++) {
+	for (unsigned int i = 0; i < 4; i++) {
         _Leds[i].setOldPositionX(_Leds[i].getPositionX());
         _Leds[i].setOldPositionY(_Leds[i].getPositionY());
     }