From 0fbe2956c358fcee8a19529af0d55815404aaa73 Mon Sep 17 00:00:00 2001 From: Kharec Date: Thu, 4 Dec 2025 06:46:28 +0100 Subject: [PATCH] refactor: didn't press :w it seems --- internal/2025/DayFour/code.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/2025/DayFour/code.go b/internal/2025/DayFour/code.go index 418820d..3f27154 100644 --- a/internal/2025/DayFour/code.go +++ b/internal/2025/DayFour/code.go @@ -21,12 +21,12 @@ func ParseInput(filepath string) []string { } func PartOne(data []string) int { - rollPositions := make(map[position]bool) + isRoll := make(map[position]bool) for row := range data { for column := 0; column < len(data[row]); column++ { if data[row][column] == '@' { - rollPositions[position{row, column}] = true + isRoll[position{row, column}] = true } } } @@ -43,11 +43,11 @@ func PartOne(data []string) int { {1, 1}, } - for pos := range rollPositions { + for pos := range isRoll { adjacentRolls := 0 for _, direction := range directions { neighbor := position{pos.row + direction.row, pos.column + direction.column} - if rollPositions[neighbor] { + if isRoll[neighbor] { adjacentRolls++ } }