Commit 88f5fd8a authored by Chevrier Florine's avatar Chevrier Florine
Browse files

last update

parent 6eeeac4d
......@@ -27,37 +27,27 @@ public class Main{
System.out.println("5/ quitter");
}
private void affichage_fic_description(){
private Scanner affichage_fic_description(){
this.affichage_clear();
System.out.println(" --- Charger fichier de description ---");
System.out.println();
System.out.println();
System.out.println("Quel est le nom de votre fichier ? (situé dans le dossier /fichiers_description)");
System.out.println("menu pour revenir au Menu");
Scanner sc = new Scanner(System.in);
return sc;
}
private Simulateur charger_fic_desc(Scanner sc1) throws Throwable{
boolean fic_charge = false;
String fic;
StringBuilder b;
private Simulateur fichiers_description()throws java.io.IOException, NomDEntiteDejaUtiliseDansLeMondeException, EntiteDejaDansUnAutreMondeException{
Scanner sc = affichage_fic_description();
String caractere = sc.next();
Simulateur simulateur = null;
this.affichage_fic_description();
while(!fic_charge){
b = new StringBuilder("./fichiers_description/");
fic = sc1.next();
if (fic.equals("menu")){
fic_charge = true;
}else{
b.append(fic);
try{
simulateur = new Simulateur(new FileReader(b.toString()));
fic_charge = true;
}catch(FileNotFoundException exception){
System.out.println();
System.out.println();
System.out.println("Fichier introuvable");
}
while (!caractere.equals("menu")){
try{
simulateur = new Simulateur(new FileReader(caractere));
}
catch(FileNotFoundException e){
System.out.println(e);
}
}
return simulateur;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment