mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-10 14:50:46 +00:00
11 lines
164 B
Go
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
|
||
|
}
|
||
|
}
|