-- |
-- Check whether the given 'Player' has one of its snorkel 'Group's trapped.
hasLost :: Board -> Player -> Bool
hasLost board p = any (isTrapped board)
                      (filter ((== p) . player) $ Set.toList $ getGroups board)
hasLost :: Board -> Player -> Bool
hasLost board p = any (isTrapped board)
                      (filter ((== p) . player) $ Set.toList $ getGroups board)
hasLost board p = any (isTrapped board)
                      (filter ((== p) . player) $ Set.toList $ getGroups board)