2023-12-15 11:40:06 +01:00
|
|
|
public class VuePerso {
|
2023-12-20 13:47:26 +01:00
|
|
|
private PieceConcrete piece;
|
|
|
|
private Contenu pieceactuelle;
|
|
|
|
public VuePerso(){
|
|
|
|
this.piece = new PieceConcrete();
|
|
|
|
|
|
|
|
}
|
2023-12-15 11:40:06 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString(){
|
2023-12-20 13:47:26 +01:00
|
|
|
this.pieceactuelle = piece.getContenu();
|
|
|
|
System.out.println("Le personnage est dans la pièce "+ this.pieceactuelle);
|
2023-12-15 11:40:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void avancer(){
|
2023-12-20 11:14:07 +01:00
|
|
|
System.out.println("Le personnage a avancer");
|
2023-12-15 11:40:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void reculer(){
|
2023-12-20 13:41:57 +01:00
|
|
|
System.out.println("Le personnage a reculer");
|
2023-12-15 11:40:06 +01:00
|
|
|
}
|
|
|
|
}
|