for int arrayToSort count Figure tempFigure1 Figure arrayToSort for in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
for (int i = 0; i < ([arrayToSort count]); i++) {
Figure* tempFigure1 = ((Figure*)arrayToSort[i]);
for (int c = 0; c < ([arrayToSort count]); c++){
Figure* tempFigure2 = ((Figure*)arrayToSort[c]);
Figure* biggerFigure = compareFigures(tempFigure1, tempFigure2);
if (c > i) {
continue;
} else {
if (biggerFigure == tempFigure2) {
continue;
} else {
arrayToSort[c] = biggerFigure;
arrayToSort[i] = tempFigure2;
}
}
}
}