public class VueShadock { private Piece[] listePiece; private Donjon donjon; private boolean isAvance; // true si la derniere direction est avance() / false si derniere direction est recule() public VueShadock(Donjon donjon, int porteeVision) { this.donjon = donjon; this.listePiece = new PieceConcrete[porteeVision]; int i, taille=this.listePiece.length; for (i=0; i0; i--){ this.listePiece[i] = this.listePiece[i-1]; } this.listePiece[0] = this.donjon.avant(); } else{ for (i=taille; i>=0; i--){ this.listePiece[i] = this.donjon.avant(); } } this.isAvance = false; } @Override public String toString() { String resultat = new String(); for (Piece piece : this.listePiece){ resultat += piece+" "; } return resultat; } }