Laucher complet

This commit is contained in:
Gasson-Betuing Danyl 2025-04-29 16:20:49 +02:00
parent cbca50bdd7
commit 92481f4b6a

View file

@ -14,6 +14,7 @@ import org.insa.graphs.gui.drawing.components.BasicDrawing;
import org.insa.graphs.model.Graph; import org.insa.graphs.model.Graph;
import org.insa.graphs.model.Path; import org.insa.graphs.model.Path;
import org.insa.graphs.model.io.BinaryGraphReader; import org.insa.graphs.model.io.BinaryGraphReader;
import org.insa.graphs.model.io.BinaryPathReader;
import org.insa.graphs.model.io.GraphReader; import org.insa.graphs.model.io.GraphReader;
import org.insa.graphs.model.io.PathReader; import org.insa.graphs.model.io.PathReader;
@ -58,22 +59,25 @@ public class Launch {
new BufferedInputStream(new FileInputStream(mapName))))) { new BufferedInputStream(new FileInputStream(mapName))))) {
// TODO: read the graph // TODO: read the graph
graph = null; graph = reader.read();
} }
// create the drawing // create the drawing
final Drawing drawing = createDrawing(); final Drawing drawing = createDrawing();
// TODO: draw the graph on the drawing // TODO: draw the graph on the drawing
drawing.drawGraph(graph);
// TODO: create a path reader // TODO: create a path reader
try (final PathReader pathReader = null) { try (final PathReader pathReader = new BinaryPathReader(new DataInputStream(
new BufferedInputStream(new FileInputStream(pathName))))) {
// TODO: read the path // TODO: read the path
path = null; path = pathReader.readPath(graph);
} }
// TODO: draw the path on the drawing // TODO: draw the path on the drawing
drawing.drawPath(path);
} }
} }