mirror of
https://forge.univ-lyon1.fr/tplifap4/gyromite_ya.git
synced 2024-02-27 13:31:49 +01:00
34 lines
706 B
Java
34 lines
706 B
Java
package modele.donnees;
|
|
|
|
import modele.calculs.Direction;
|
|
import modele.calculs.Jeu;
|
|
|
|
public abstract class Items extends ElementFond implements ElementDynamique {
|
|
public Items(Jeu jeu) {
|
|
super(jeu);
|
|
}
|
|
|
|
@Override
|
|
public boolean peutPermettreDeMonterDescendre() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean estRectable() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean avancerDirectionChoisie(Direction d) {
|
|
return jeu.deplacerEntite(this, d);
|
|
}
|
|
|
|
public ElementPhysique regarderDevantSoit() {
|
|
return jeu.regarderDevantSoit(this);
|
|
}
|
|
|
|
public boolean estRecolte() {
|
|
return avancerDirectionChoisie(null);
|
|
}
|
|
}
|