refactor: extract grid abstraction for reuse

This commit is contained in:
Stevan Freeborn
2025-12-07 21:25:34 -06:00
parent d185ffda50
commit 4ca54ebb63
9 changed files with 418 additions and 131 deletions
+22
View File
@@ -0,0 +1,22 @@
package position_test
import (
"testing"
"github.com/StevanFreeborn/advent-of-code-2025/internal/position"
)
func TestFrom(t *testing.T) {
row := 3
column := 5
pos := position.From(row, column)
if pos.Row() != row {
t.Errorf("expected row to be %d, got %d", row, pos.Row())
}
if pos.Column() != column {
t.Errorf("expected column to be %d, got %d", column, pos.Column())
}
}