mirror of
https://github.com/solero/houdini.git
synced 2024-12-22 13:33:39 +00:00
Make CJ Sensei card picks appear more random
This commit is contained in:
parent
10d8bf4d5d
commit
a44d505bb8
@ -208,7 +208,14 @@ class SenseiLogic(CardJitsuLogic):
|
||||
|
||||
def get_win_card(self, card):
|
||||
self.colors = [] if len(self.colors) >= 6 else self.colors
|
||||
for card_check in self.penguins[0].server.cards.values():
|
||||
|
||||
cards_to_pick = self.penguins[0].server.cards
|
||||
cards_iter = cards_to_pick.values()
|
||||
cards_end_to_end = itertools.chain(cards_iter, cards_iter)
|
||||
start_position = random.randint(0, len(cards_to_pick))
|
||||
cards_random_start = itertools.islice(cards_end_to_end, start_position, start_position+len(cards_to_pick))
|
||||
|
||||
for card_check in cards_random_start:
|
||||
if card_check.color not in self.colors and self.beats_card(card_check, card):
|
||||
self.colors.append(card_check.color)
|
||||
return card_check
|
||||
|
Loading…
Reference in New Issue
Block a user