This commit is contained in:
Favary Pierre 2021-04-03 15:42:24 +02:00
parent 99b92a7b0a
commit c3d9577472

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.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;
@ -54,20 +55,23 @@ public class Launch {
new DataInputStream(new BufferedInputStream(new FileInputStream(mapName))));
// TODO: Read the graph.
final Graph graph = null;
final Graph graph = reader.read();
// Create the drawing:
final Drawing drawing = createDrawing();
// TODO: Draw the graph on the drawing.
drawing.drawGraph(graph);
// TODO: Create a PathReader.
final PathReader pathReader = null;
final PathReader pathReader = new BinaryPathReader(
new DataInputStream(new BufferedInputStream(new FileInputStream(pathName))));
// TODO: Read the path.
final Path path = null;
final Path path = pathReader.readPath(graph);
// TODO: Draw the path.
drawing.drawPath(path);
}
}