-- |
-- Check whether a given 'Group' is trapped by having all its surrounding
-- positions taken by 'Stone's or 'Snorkel's from some other 'Player'.
isTrapped :: Board -> Group -> Bool
isTrapped board group = all (isBlocking (group&player) . getPiece board)
                            (Set.toList $ areNeighbours board $ group&positions)
isTrapped :: Board -> Group -> Bool
isTrapped board group = all (isBlocking (group&player) . getPiece board)
                            (Set.toList $ areNeighbours board $ group&positions)
isTrapped board group = all (isBlocking (group&player) . getPiece board)
                            (Set.toList $ areNeighbours board $ group&positions)