def choose_trumpf(self, geschoben): allowed = False while not allowed: trumpf, _ = choose_trumpf(cards=self.cards, geschoben=geschoben) allowed = yield trumpf if allowed: yield None
def choose_trumpf(self, geschoben): if self.trumpf_model is None: allowed = False while not allowed: trumpf, _ = choose_trumpf(cards=self.cards, geschoben=geschoben) allowed = yield trumpf if allowed: yield None else: trumpf_list = self.choose_game_mode(hand_cards=self.cards, geschoben=geschoben) for trumpf in trumpf_list: yield trumpf
def test_choose_trumpf_no_schieben(cards, trumpf, trumpf_type): evaluate_trumpf, evaluate_trumpf_type = choose_trumpf(cards=cards, geschoben=False) assert (evaluate_trumpf, evaluate_trumpf_type) == (trumpf, trumpf_type)