aoc2024/day-15/internal/one/direction.go

17 lines
195 B
Go
Raw Normal View History

2024-12-16 11:56:53 +00:00
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))
}