Skip to content

Commit 5b557f7

Browse files
committed
Fixed BarColor issue
1 parent aaf0f92 commit 5b557f7

6 files changed

Lines changed: 14 additions & 12 deletions

File tree

Binary file not shown.

src/com/marcomsl/algorithmvisualization/AlgorithmFrame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
public class AlgorithmFrame extends JFrame {
77

8-
int size;
8+
private int size;
99

1010

1111
public AlgorithmFrame(int[] array, BarColor barColor){

src/com/marcomsl/algorithmvisualization/AlgorithmVisualizer.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class AlgorithmVisualizer {
1010

1111
private int[] array;
1212
private ArrayList<Integer> arrayList = new ArrayList<>();
13-
private BarColor barColor;
13+
BarColor barColor;
1414

1515
public AlgorithmVisualizer() {
1616
array = new int[50];
@@ -66,13 +66,6 @@ private void fillArray() {
6666
}
6767
}
6868

69-
public int[] getArray() {
70-
return array;
71-
}
72-
73-
public void resetArray() {
74-
fillArray();
75-
}
7669

7770
public void bubblesort(int animationSpeed) throws InterruptedException {
7871
int temp;
@@ -121,4 +114,13 @@ public void selectionSort(int animationSpeed) throws InterruptedException {
121114
}
122115

123116

117+
public int[] getArray() {
118+
return array;
119+
}
120+
121+
public void resetArray() {
122+
fillArray();
123+
}
124+
125+
124126
}

src/com/marcomsl/algorithmvisualization/ValueBars.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
public class ValueBars extends JPanel {
77

8-
int[] array;
9-
int size;
10-
BarColor barColor;
8+
private int[] array;
9+
private int size;
10+
private BarColor barColor;
1111

1212

1313
public ValueBars(int[] array, int size, BarColor barColor){

0 commit comments

Comments
 (0)