Commit 3bd3d858 authored by Achille Lacoin's avatar Achille Lacoin
Browse files

Correction des erreurs d'utilisation de flux

parent 666645fb
package fr.insarouen.asi.prog.asiaventure;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
......@@ -32,7 +33,7 @@ public class Main {
switch (choixMenu) {
case 1:
jouer(scanner);
jouer();
break;
case 2:
......@@ -87,7 +88,7 @@ public class Main {
System.out.println("\t 5/ Quitter \n");
}
private static void jouer(Scanner scanner) throws Throwable {
private static void jouer() throws Throwable {
if (simulateur == null) {
System.out.println("Veuillez initialiser un Monde");
return;
......@@ -113,10 +114,8 @@ public class Main {
throws IOException, NomDEntiteDejaUtiliseDansLeMondeException {
FileReader reader = null;
try {
reader = new FileReader(cheminFichier);
reader = new FileReader(new File("generationMonde.txt"));
simulateur = new Simulateur(reader);
} catch (IOException e) {
System.out.println("ici");
} finally {
reader.close();
}
......
Supports Markdown
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