mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 06:10:47 +00:00
13 lines
271 B
Go
13 lines
271 B
Go
package two
|
|
|
|
import "github.com/onyx-and-iris/aoc2024/day-18/internal/point"
|
|
|
|
func neighbours(p point.Point) [4]point.Point {
|
|
return [4]point.Point{
|
|
{X: p.X, Y: p.Y - 1}, // N
|
|
{X: p.X + 1, Y: p.Y}, // E
|
|
{X: p.X, Y: p.Y + 1}, // S
|
|
{X: p.X - 1, Y: p.Y}, // W
|
|
}
|
|
}
|