Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
    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()
Exemplo n.º 4
0
 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()
Exemplo n.º 5
0
    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
Exemplo n.º 6
0
 def nextcard(self, fight_history) -> Card:
     return card.random()