mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-21 18:00:47 +00:00
add one docstrings
This commit is contained in:
parent
b98379ca2b
commit
e8f7c2a63d
@ -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' {
|
||||
|
Loading…
Reference in New Issue
Block a user