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

11 lines
164 B
Go
Raw Permalink Normal View History

2024-12-13 10:02:48 +00:00
package one
func neighbours(p point) [4]point {
return [4]point{
{p.x, p.y - 1}, // N
{p.x + 1, p.y}, // E
{p.x, p.y + 1}, // S
{p.x - 1, p.y}, // W
}
}