?
這個提交存在於:
父節點
99b92a7b0a
當前提交
c3d9577472
共有 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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
載入中…
新增問題並參考