Generate populations correctly
This commit is contained in:
@@ -175,10 +175,10 @@ public class InteractiveInterface {
|
||||
throw new InputMismatchException("Max well population must be greater than min well population");
|
||||
}
|
||||
//maximum should be inclusive, so need to add one to max of randomly generated values
|
||||
populations = (Integer[]) rand.ints(minPop, maxPop + 1)
|
||||
populations = rand.ints(minPop, maxPop + 1)
|
||||
.limit(numSections)
|
||||
.boxed()
|
||||
.toArray();
|
||||
.toArray(Integer[]::new);
|
||||
System.out.print("Populations: ");
|
||||
System.out.println(Arrays.toString(populations));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user