aoc21/d9/common.go

16 lines
260 B
Go
Raw Normal View History

2022-02-21 22:28:30 +02:00
package d9
import (
"fmt"
"strings"
)
func addWalls(lines []string) []string {
for i, line := range lines {
lines[i] = fmt.Sprintf("9%v9", line)
}
nines := strings.Repeat("9", len(lines[0]))
return append([]string{nines}, append(lines, nines)...)
}