35 lines
643 B
Go
35 lines
643 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func main() {
|
|
// Create a session with a random ID and read the graph from file
|
|
session := &Session{
|
|
ID: generateRandomID(),
|
|
Graph: nil,
|
|
}
|
|
|
|
// Read graph from file
|
|
graph, err := ReadGraphFromFile("graph.txt")
|
|
if err != nil {
|
|
fmt.Println("Error reading graph:", err)
|
|
return
|
|
}
|
|
|
|
// Set the graph for the session
|
|
session.Graph = graph
|
|
|
|
fmt.Println("Session ID:", session.ID)
|
|
fmt.Println("Graph:")
|
|
PrettyPrintGraph(graph)
|
|
|
|
CompleteSplit(session, graph.Start)
|
|
CompleteSplit(session, graph.Splits[1])
|
|
CompleteSplit(session, graph.Splits[2])
|
|
|
|
PrettyPrintGraph(graph)
|
|
fmt.Println("Done.")
|
|
}
|