Day19 Part1

This commit is contained in:
Karl Spickermann 2022-12-20 02:11:26 +01:00
parent 34155ab4f3
commit 68f008c7ff

@ -26,12 +26,14 @@ func main() {
highestGeode := make([]int, len(lines))
for i, line := range lines {
blueprint := getBluePrint(line)
//fastestTime := getFastestTimeToElementN(blueprint, map[[4]int]State{[4]int{0, 0, 0, 0, 1, 0, 0, 0}: State{[4]int{0, 0, 0, 0}, [4]int{1, 0, 0, 0}, 0}}, 3)
//startStates := getAllPossibleCombinationsWithFastestTime(blueprint, map[[4]int]State{[4]int{0, 0, 0, 0, 1, 0, 0, 0}: State{[4]int{0, 0, 0, 0}, [4]int{1, 0, 0, 0}, 0}}, 3, fastestTime)
//tmpStates := getAllPossibleCombinationsWithFastestTime(blueprint, map[[4]int]State{[4]int{0, 0, 0, 0, 1, 0, 0, 0, 0}: State{[4]int{0, 0, 0, 0}, [4]int{1, 0, 0, 0}, 0}}, 2, fastestTime)
//fastestTime = getFastestTimeToElementN(blueprint, tmpStates, 3)
//startStates = getAllPossibleCombinationsWithFastestTime(blueprint, startStates, 3, fastestTime)
highestGeode[i] = getHighestGeode(blueprint, map[[4]int]State{[4]int{0, 0, 0, 0}: State{[4]int{0, 0, 0, 0}, [4]int{1, 0, 0, 0}, 0}})
highestGeodeLine := 0
for j := 0; j < 50; j++ {
tmphighestGeode := getHighestGeode(blueprint, map[[4]int]State{[4]int{0, 0, 0, 0}: State{[4]int{0, 0, 0, 0}, [4]int{1, 0, 0, 0}, 0}})
if tmphighestGeode > highestGeodeLine {
highestGeodeLine = tmphighestGeode
}
}
highestGeode[i] = highestGeodeLine
fmt.Println(highestGeode[i])
}
sum := 0