2020-04-17 12:15:07 +02:00
|
|
|
package carte;
|
|
|
|
|
2020-04-21 13:45:45 +02:00
|
|
|
import java.awt.Point;
|
|
|
|
|
2020-04-17 15:05:15 +02:00
|
|
|
import main.Joueur;
|
2020-04-21 13:45:45 +02:00
|
|
|
import main.Pioche;
|
|
|
|
import main.Type;
|
2020-04-17 15:05:15 +02:00
|
|
|
|
2020-04-21 13:45:45 +02:00
|
|
|
public class CarteLieuType<T extends Type> extends CarteLieu{
|
|
|
|
|
|
|
|
private Pioche<T> pioche;
|
|
|
|
|
2020-04-17 12:15:07 +02:00
|
|
|
|
2020-04-21 15:27:27 +02:00
|
|
|
public CarteLieuType(String name, String description ,Point coordinates,Pioche<T> pioche) {
|
|
|
|
super(name , description , coordinates);
|
2020-04-21 13:45:45 +02:00
|
|
|
this.pioche = pioche;
|
|
|
|
}
|
|
|
|
|
2020-04-22 15:23:58 +02:00
|
|
|
/*
|
|
|
|
* @param j Appel la méthode utiliser de effet sur le joueur j
|
|
|
|
*/
|
2020-04-17 12:15:07 +02:00
|
|
|
public void utiliser(Joueur j) {
|
2020-04-21 13:45:45 +02:00
|
|
|
|
|
|
|
CartePiochable<?> carte = pioche.piocher();
|
|
|
|
carte.utiliser(j);
|
2020-04-17 12:15:07 +02:00
|
|
|
}
|
2020-04-21 13:45:45 +02:00
|
|
|
|
2020-04-17 12:15:07 +02:00
|
|
|
|
|
|
|
}
|