def is_ladder(self): """Checks if a character is a ladder character. :return: True if character is ladder otherwise False :rtype: bool """ return is_set_bit(self.char_status, 6)
def is_died(self): """Checks if a character is dead. :return: True if character is dead otherwise False :rtype: bool """ return is_set_bit(self.char_status, 3)
def is_expansion(self): """Checks if a character is an expansion character. :return: True if character is expansion otherwise False :rtype: bool """ return is_set_bit(self.char_status, 5)
def is_hardcore(self): """Checks if a character is in hardcore mode. :return: True if character is in hardcore mode otherwise False :rtype: bool """ return is_set_bit(self.char_status, 2)
def test_is_set_bit(num, bit_pos, expected): assert is_set_bit(num, bit_pos) is expected