Page 96 - MDP2022-3
P. 96
clearBuffer();
delay(animationSpeed);
}
for (int x = 0; x < 4; x++) {
for (int z = 0; z < 4; z++) drawLine(color,z,3,3,z,x,0);
flushBuffer();
clearBuffer();
delay(animationSpeed);
}
side = 1; break;
case 21:
for (int y = 3; y > -1; y--) {
for (int z = 3; z > -1; z--) drawLine(color,0,z,3,3,z,y);
flushBuffer();
clearBuffer();
delay(animationSpeed);
}
for (int y = 3; y > -1; y--) {
for (int z = 0; z < 4; z++) drawLine(color,0,z,3,y,z,0);
flushBuffer();
clearBuffer();
delay(animationSpeed);
}
side = 2; break;
case 22:
for (int y = 3; y > -1; y--) {
for (int z = 0; z < 4; z++) drawLine(color,z,0,3,z,3,y);
flushBuffer();
clearBuffer();
delay(animationSpeed);
}
for (int y = 3; y > -1; y--) {
for (int x = 0; x < 4; x++) drawLine(color,x,0,3,x,y,0);
flushBuffer();
clearBuffer();
delay(animationSpeed);
}
side = 3; break;
case 23:
for (int y = 3; y > -1; y--) {
for (int z = 0; z < 4; z++) drawLine(color,3,z,3,0,z,y);
flushBuffer();
clearBuffer();
delay(animationSpeed);
}