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

11 lines
164 B
Go
Raw Normal View History

2024-12-18 18:48:11 +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
}
}