def _is_related(self, person: GiftRecipient) -> bool: """ Check to see if the specified recipient is related to this Santa :param person: Gift recipient to check :return: Whether or not the two are related (same family name) """ return self._family_name == person.get_family_name()
def add_recipient(self, gift_recipient: GiftRecipient) -> None: """ Add a new recipient to this Santa's list :param gift_recipient: Gift recipient to add :return: """ self._gift_recipients.append(gift_recipient.get_name())
def _is_already_gifting(self, gift_recipient: GiftRecipient) -> bool: """ Check to see if the specified recipient is already being gifted by this Santa. :param gift_recipient: Gift recipient to check :return: Whether or not this person has already been selected by this Santa """ return gift_recipient.get_name() in self._gift_recipients