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

11 lines
176 B
Go
Raw Permalink Normal View History

2024-12-05 01:31:44 +00:00
package two
func neighbours(p point) [4]point {
return [4]point{
{p.x - 1, p.y - 1, NW},
{p.x + 1, p.y - 1, NE},
{p.x + 1, p.y + 1, SE},
{p.x - 1, p.y + 1, SW},
2024-12-05 01:31:44 +00:00
}
}