Laucher complet

This commit is contained in:
Gasson-Betuing Danyl 2025-04-29 16:20:49 +02:00
父節點 cbca50bdd7
當前提交 92481f4b6a

查看文件

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