package one func neighbours(p point) [8]point { return [8]point{ {y: p.y - 1, x: p.x, direction: N}, {y: p.y - 1, x: p.x + 1, direction: NE}, {y: p.y, x: p.x + 1, direction: E}, {y: p.y + 1, x: p.x + 1, direction: SE}, {y: p.y + 1, x: p.x, direction: S}, {y: p.y + 1, x: p.x - 1, direction: SW}, {y: p.y, x: p.x - 1, direction: W}, {y: p.y - 1, x: p.x - 1, direction: NW}, } }