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]