-- |
-- Filter 'Position's only leaving those which have a 'Snorkel' of the given
-- 'Player' in some board.
areFromPlayer :: Board -> Player -> Set.Set Position -> Set.Set Position
areFromPlayer board player = Set.filter (maybe False fromPlayer . getPiece board)
                           . areSnorkels board
    where fromPlayer = maybe False (player ==) . getPlayer

-- |
-- Put into a 'Group' 'Position's that are immediate neighbours.
areFromPlayer :: Board -> Player -> Set.Set Position -> Set.Set Position
areFromPlayer board player = Set.filter (maybe False fromPlayer . getPiece board)
                           . areSnorkels board
    where fromPlayer = maybe False (player ==) . getPlayer

-- |
-- Put into a 'Group' 'Position's that are immediate neighbours.
areFromPlayer board player = Set.filter (maybe False fromPlayer . getPiece board)
                           . areSnorkels board
    where fromPlayer = maybe False (player ==) . getPlayer

-- |
-- Put into a 'Group' 'Position's that are immediate neighbours.