mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-10 14:50:46 +00:00
25 lines
241 B
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}
|
||
|
}
|