Remove not needed structs, fix parsing route map parsing
This commit is contained in:
parent
0eb93030db
commit
ad87697b41
|
@ -8,16 +8,6 @@ import (
|
|||
"unicode"
|
||||
)
|
||||
|
||||
type pathTracking struct {
|
||||
route []string
|
||||
visitedSmallCaveTwice bool
|
||||
}
|
||||
|
||||
type stepTracking struct {
|
||||
destiny string
|
||||
visitedSmallCaveTwice bool
|
||||
}
|
||||
|
||||
func main() {
|
||||
args := os.Args[1:]
|
||||
input, err := helper.GetInput(args[0])
|
||||
|
@ -31,7 +21,9 @@ func main() {
|
|||
if splitLine[0] != "start" && splitLine[1] != "end" {
|
||||
routeMap[splitLine[1]] = append(routeMap[splitLine[1]], splitLine[0])
|
||||
}
|
||||
routeMap[splitLine[0]] = append(routeMap[splitLine[0]], splitLine[1])
|
||||
if splitLine[1] != "start" && splitLine[0] != "end" {
|
||||
routeMap[splitLine[0]] = append(routeMap[splitLine[0]], splitLine[1])
|
||||
}
|
||||
}
|
||||
for key, val := range routeMap {
|
||||
fmt.Printf("%s : %s \n", key, val)
|
||||
|
|
Loading…
Reference in New Issue
Block a user