aoc2024/day-16/internal/two/node.go

25 lines
241 B
Go

package two
type direction int
const (
N direction = iota
E
S
W
)
type coords struct {
x int
y int
}
type node struct {
coords
direction direction
}
func newNode(x, y int, dir direction) node {
return node{coords{x, y}, dir}
}