Page 95 - MDP2022-3
P. 95

delay(animationSpeed);
                                }
                                for  (int  y  =  3;  y  >  -1;  y--)  {
                                    for  (int  z  =  0;  z  <  4;  z++)  drawLine(color,3,0,z,0,y,z);
                                    flushBuffer();
                                    clearBuffer();
                                    delay(animationSpeed);
                                }
                                side  =  3;  break;
                            case  17:
                                for  (int  y  =  3;  y  >  -1;  y--)  {
                                    for  (int  z  =  0;  z  <  4;  z++)  drawLine(color,3,z,3,y,z,0);
                                    flushBuffer();
                                    clearBuffer();
                                    delay(animationSpeed);
                                }
                                for  (int  y  =  0;  y  <  4;  y++)  {
                                    for  (int  x  =  0;  x  <  4;  x++)  drawLine(color,3,x,3,0,x,y);
                                    flushBuffer();
                                    clearBuffer();
                                    delay(animationSpeed);
                                }
                                side  =  5;  break;
                            case  18:
                                for  (int  y  =  3;  y  >  -1;  y--)  {
                                    for  (int  z  =  0;  z  <  4;  z++)  drawLine(color,3,z,0,y,z,3);
                                    flushBuffer();
                                    clearBuffer();
                                    delay(animationSpeed);
                                }
                                for  (int  y  =  3;  y  >  -1;  y--)  {
                                    for  (int  x  =  0;  x  <  4;  x++)  drawLine(color,3,x,0,0,x,y);
                                    flushBuffer();
                                    clearBuffer();
                                    delay(animationSpeed);
                                }
                                side  =  6;  break;
                            }
                        }
                    if  (side  ==  5)  {
                        switch(random(20,25))  {
                            case  20:
                                for  (int  y  =  3;  y  >  -1;  y--){
                                    for  (int  z  =  0;  z  <  4;  z++)  drawLine(color,z,3,3,z,0,y);
                                    flushBuffer();
   90   91   92   93   94   95   96   97   98   99   100