Pārlūkot izejas kodu

made DrawYahtzeeDice take in an int[]

Chad 6 gadus atpakaļ
vecāks
revīzija
806e411840

+ 6
- 6
src/main/java/io/zipcoder/casino/Leviathan/Games/GameUtilities/DrawYahtzeeDice.java Parādīt failu

@@ -6,12 +6,12 @@ import java.util.List;
6 6
 
7 7
 public class DrawYahtzeeDice {
8 8
 
9
-    public StringBuilder drawYahtzeeDice(int x, int y, int z, int a, int b) {
10
-        DiceBuilder die1 = new DiceBuilder(x - 1);
11
-        DiceBuilder die2 = new DiceBuilder(y - 1);
12
-        DiceBuilder die3 = new DiceBuilder(z - 1);
13
-        DiceBuilder die4 = new DiceBuilder(a - 1);
14
-        DiceBuilder die5 = new DiceBuilder(b - 1);
9
+    public StringBuilder drawYahtzeeDice(int... ints) {
10
+        DiceBuilder die1 = new DiceBuilder(ints[0] - 1);
11
+        DiceBuilder die2 = new DiceBuilder(ints[1] - 1);
12
+        DiceBuilder die3 = new DiceBuilder(ints[2] - 1);
13
+        DiceBuilder die4 = new DiceBuilder(ints[3] - 1);
14
+        DiceBuilder die5 = new DiceBuilder(ints[4] - 1);
15 15
 
16 16
         List<Iterator<String>> dice = Arrays.asList(
17 17
                 die1.iterator(),