feat: wip on day 9 part 2 solution

This commit is contained in:
Stevan Freeborn
2025-12-18 14:04:21 -06:00
parent a24eb9f9d3
commit 2888719dc5
3 changed files with 133 additions and 17 deletions
+9 -1
View File
@@ -1,7 +1,11 @@
// Package position provides types and functions to represent and manipulate positions and moves on a 2D grid.
package position
import "github.com/StevanFreeborn/advent-of-code-2025/internal/move"
import (
"fmt"
"github.com/StevanFreeborn/advent-of-code-2025/internal/move"
)
type Position interface {
Row() int
@@ -32,3 +36,7 @@ func (p position) Column() int {
func (p position) Move(move move.Move) Position {
return From(p.row+move.NumberOfRows(), p.column+move.NumberOfColumns())
}
func (p position) String() string {
return fmt.Sprintf("c: %d r: %d", p.column, p.row)
}