add one docstrings

This commit is contained in:
onyx-and-iris 2023-12-14 22:24:56 +00:00
parent b98379ca2b
commit e8f7c2a63d

View File

@ -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' {