From e8f7c2a63d144e3b9feb206e2c5dfea3c70d4a9b Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 14 Dec 2023 22:24:56 +0000 Subject: [PATCH] add one docstrings --- day-14/one.go | 3 +++ 1 file changed, 3 insertions(+) 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' {