diff --git a/day-14/one.go b/day-14/one.go index 3c94200..d93edc5 100644 --- a/day-14/one.go +++ b/day-14/one.go @@ -2,6 +2,7 @@ package main const MAX = 10 +// getload returns the load of all boulders for a single image func getload(raw []string) int { load := 0 for _, line := range raw { @@ -15,6 +16,7 @@ func getload(raw []string) int { return load } +// spacesToRight determines the number of spaces right of a boulder func spacesToRight(i int, line string) int { num := 0 outer: @@ -29,6 +31,7 @@ outer: return num } +// rollRight rolls a boulder right until there's no space func rollRight(line string) string { for i := len(line) - 1; i >= 0; i-- { if line[i] == 'O' {