aoc2024/day-15/internal/one/neighbours.go
2024-12-16 11:56:53 +00:00

11 lines
164 B
Go

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
}
}