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

11 lines
144 B
Go

package two
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},
}
}