def setShapeHealth(self):
     if self.__character.species == "Werewolf":
         value = self.ui.dots_health.value
         self.ui.label_healthShapes.setHidden(False)
         self.ui.label_healthShapes.setText("{}, {}, {}, {}".format(
             CalcShapes.health(value, Config.SHAPES_WEREWOLF[1]),
             CalcShapes.health(value, Config.SHAPES_WEREWOLF[2]),
             CalcShapes.health(value, Config.SHAPES_WEREWOLF[3]),
             CalcShapes.health(value, Config.SHAPES_WEREWOLF[4]),
         ))
     else:
         self.ui.label_healthShapes.setHidden(True)
	def setShapeHealth(self):
		if self.__character.species == "Werewolf":
			value = self.ui.dots_health.value
			self.ui.label_healthShapes.setHidden(False)
			self.ui.label_healthShapes.setText("{}, {}, {}, {}".format(
				CalcShapes.health(value, Config.SHAPES_WEREWOLF[1]),
				CalcShapes.health(value, Config.SHAPES_WEREWOLF[2]),
				CalcShapes.health(value, Config.SHAPES_WEREWOLF[3]),
				CalcShapes.health(value, Config.SHAPES_WEREWOLF[4]),
			))
		else:
			self.ui.label_healthShapes.setHidden(True)
	def test__health(self):
		"""
		Überprüft die Berechnung der Gesundheit.
		"""

		for val_1 in range(1, ATTRIBUTE_MAX + 1):
			for shape in SHAPES:
				self.assertGreaterEqual( CalcShapes.health(val_1, shape), val_1 )
Esempio n. 4
0
    def test__health(self):
        """
		Überprüft die Berechnung der Gesundheit.
		"""

        for val_1 in range(1, ATTRIBUTE_MAX + 1):
            for shape in SHAPES:
                self.assertGreaterEqual(CalcShapes.health(val_1, shape), val_1)