def next(self, fight_history: List[Fight]): n = len(fight_history) + 1 if n % 3 == 1: return card.random() last = fight_history[-1] return card.next(last.player)
def nextcard(self, fight_history) -> Card: n = (len(fight_history) + 1) % 100 if n == 1 or n == 34 or n == 67: self.current_logic = self.next_logic() return self.current_logic.next(fight_history) \ if self.current_logic is not None else card.random()
def next(self, fight_history: List[Fight]): n = len(fight_history) + 1 if n % 3 == 0 and n % 5 == 0: return Card.Choki elif n % 3 == 0: return Card.Gu elif n % 5 == 0: return Card.Pa return card.random()
def random_from_deck(self): if (self.deck[Card.Gu] == 0) and (self.deck[Card.Pa] > 0) and (self.deck[Card.Choki] > 0): return Card.Pa if (self.deck[Card.Gu] > 0) and (self.deck[Card.Pa] == 0) and (self.deck[Card.Choki] > 0): return Card.Choki if (self.deck[Card.Gu] > 0) and (self.deck[Card.Pa] > 0) and (self.deck[Card.Choki] == 0): return Card.Gu return card.random()
def next(self, fight_history: List[Fight]): n = len(fight_history) + 1 if n % 3 == 1: return card.random() if self.prev_card is None: self.prev_card = Card.Gu return Card.Gu self.prev_card = card.next(self.prev_card) return self.prev_card
def nextcard(self, fight_history) -> Card: return card.random()