val is True or False that determines if we should horizontally flip the surface or not.

def set_hflip(self, val):
        """val is True or False that determines if we should horizontally flip the surface or not."""
        if self.__horizontal_flip is not val:
            self.__horizontal_flip = val
            self.image = pygame.transform.flip(self.untransformed_image, val, self.__vertical_flip)