aoc2024/day-15/internal/two/directions.go

21 lines
231 B
Go

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