aoc2024/day-10/internal/one/neighbours.go

11 lines
144 B
Go

package one
func neighbours(p point) [4]point {
return [4]point{
{p.x, p.y - 1},
{p.x + 1, p.y},
{p.x, p.y + 1},
{p.x - 1, p.y},
}
}