aoc2024/day-15/internal/one/direction.go
2024-12-16 11:56:53 +00:00

17 lines
195 B
Go

package one
import "slices"
type direction int
const (
N direction = iota
E
S
W
)
func directions(dir rune) direction {
return direction(slices.Index([]rune{'^', '>', 'v', '<'}, dir))
}