예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
def test_is_set_bit(num, bit_pos, expected):
    assert is_set_bit(num, bit_pos) is expected