-- |
-- Given a 'Position', get the 'Set.Set' of 'Position's that are immediatelly
-- above, under, to the left, or to the right.
neighbours :: Position -> Set.Set Position
neighbours position = Set.map (`offset` position) neighbourOffsets
    where neighbourOffsets = Set.fromList [(-1, 0), (1, 0), (0, -1), (0, 1)]

-- |
-- Check if some 'Position' is within the bounds of a board
neighbours :: Position -> Set.Set Position
neighbours position = Set.map (`offset` position) neighbourOffsets
    where neighbourOffsets = Set.fromList [(-1, 0), (1, 0), (0, -1), (0, 1)]

-- |
-- Check if some 'Position' is within the bounds of a board
neighbours position = Set.map (`offset` position) neighbourOffsets
    where neighbourOffsets = Set.fromList [(-1, 0), (1, 0), (0, -1), (0, 1)]

-- |
-- Check if some 'Position' is within the bounds of a board