Laucher complet
This commit is contained in:
父節點
cbca50bdd7
當前提交
92481f4b6a
共有 1 個文件被更改,包括 7 次插入 和 3 次删除
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
載入中…
Reference in a new issue