From e7aadcb38c1f347699f6a512dc9c218935609ed2 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Sat, 1 Aug 2020 23:37:40 +0200 Subject: [PATCH] :bug: --- funcs/games/fourInARow.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/funcs/games/fourInARow.py b/funcs/games/fourInARow.py index 8eb02cc..9cf7110 100644 --- a/funcs/games/fourInARow.py +++ b/funcs/games/fourInARow.py @@ -227,10 +227,9 @@ def fourInARowAI(channel): possibleScores = scores.copy() - while min(possibleScores) <= (max(possibleScores) - max(possibleScores)/10): + while (min(possibleScores) <= (max(possibleScores) - max(possibleScores)/10)) or len(possibleScores) == 1: possibleScores.remove(min(possibleScores)) - print(possibleScores) highest_score = random.choice(possibleScores) indices = [i for i, x in enumerate(scores) if x == highest_score]