mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Fix: shuffle bag initially
This commit is contained in:
@@ -19,6 +19,7 @@ public class BagRandomizer<T > implements Iterable<T>{
|
|||||||
|
|
||||||
public BagRandomizer(T[] items) {
|
public BagRandomizer(T[] items) {
|
||||||
bag = items;
|
bag = items;
|
||||||
|
shuffleBag();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BagRandomizer(Iterable<T> items) {
|
public BagRandomizer(Iterable<T> items) {
|
||||||
@@ -27,6 +28,7 @@ public class BagRandomizer<T > implements Iterable<T>{
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
bag = (T[]) list.toArray();
|
bag = (T[]) list.toArray();
|
||||||
|
shuffleBag();
|
||||||
}
|
}
|
||||||
|
|
||||||
public T getNextItem() {
|
public T getNextItem() {
|
||||||
|
|||||||
Reference in New Issue
Block a user