| Conditions | 4 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package example.bubbleSortVisualization; |
||
| 19 | protected void sort() { |
||
| 20 | for (int pass = 0; pass < list.length; pass++) { |
||
| 21 | for (finger = 0; finger < list.length - 1; finger++) { |
||
| 22 | if (list[finger] > list[finger + 1]) { |
||
| 23 | swap(finger, finger + 1); |
||
| 24 | } |
||
| 25 | sleep(2); // ideally this delay is a multiple of the animation frame delay |
||
| 26 | } |
||
| 30 |