Sort and Scramble done, Game.java done (I think)
This commit is contained in:
parent
cac5182b6a
commit
c0a02db783
1 changed files with 4 additions and 4 deletions
|
@ -62,9 +62,9 @@ public class GameWheel
|
|||
individual lists, then combine into big list similar to scramble method.
|
||||
*/
|
||||
ArrayList<Slice> newSlices = new ArrayList<>();
|
||||
ArrayList<Slice> redStuff = new ArrayList<>(sort(colorSplit(slices, "red")));
|
||||
ArrayList<Slice> blueStuff = new ArrayList<>(sort(colorSplit(slices, "blue")));
|
||||
ArrayList<Slice> blackStuff = new ArrayList<>(sort(colorSplit(slices, "black")));
|
||||
ArrayList<Slice> redStuff = new ArrayList<>(privateSort(colorSplit(slices, "red")));
|
||||
ArrayList<Slice> blueStuff = new ArrayList<>(privateSort(colorSplit(slices, "blue")));
|
||||
ArrayList<Slice> blackStuff = new ArrayList<>(privateSort(colorSplit(slices, "black")));
|
||||
int blackCount = 0;
|
||||
int blueCount = 0;
|
||||
int redCount = 0;
|
||||
|
@ -159,7 +159,7 @@ public class GameWheel
|
|||
Collections.shuffle(list);
|
||||
return list;
|
||||
}
|
||||
private ArrayList<Slice> sort(ArrayList<Slice> list){
|
||||
private ArrayList<Slice> privateSort(ArrayList<Slice> list){
|
||||
for (int i = 1; i < list.size(); i++){
|
||||
Slice toInsert = new Slice("toInsert", list.get(i).getPrizeAmount());
|
||||
int j;
|
||||
|
|
Loading…
Reference in a new issue