CarteLieu possède désormais ses propres pioches
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
import carte.CartePiochable;
|
||||
@@ -9,7 +10,13 @@ public class Pioche<T extends Type> {
|
||||
|
||||
private Stack<CartePiochable<T>> cartesPiochables;
|
||||
|
||||
|
||||
public Pioche(List<CartePiochable<T>> cartesPiochables) {
|
||||
super();
|
||||
this.cartesPiochables = new Stack<CartePiochable<T>>();
|
||||
this.cartesPiochables.addAll(cartesPiochables);
|
||||
melanger();
|
||||
}
|
||||
|
||||
public void melanger()
|
||||
{
|
||||
Collections.shuffle(cartesPiochables);
|
||||
|
||||
Reference in New Issue
Block a user