change order
Mon Apr 01 2024 02:05:15 GMT+0000 (Coordinated Universal Time)
Saved by
@rvargas
void changeOrder(Button button){
if (button == UP){
temp = shapes[selectedShape];
for(int i = selectedShape; i < shapeCounter; ++i){
shapes[i] = shapes[i+1];
std::cout << i << std::endl;
}
shapes[shapeCounter - 1] = temp;
selectedShape = shapeCounter - 1;
}
else if (button == DOWN){
temp = shapes[selectedShape];
for(int i = selectedShape; i > 0; --i){
shapes[i] = shapes[i-1];
}
shapes[0] = temp;
selectedShape = 0;
}
}
content_copyCOPY
Comments