diff --git a/waggle-dance.py b/waggle-dance.py index 2ae078c..c9e5529 100755 --- a/waggle-dance.py +++ b/waggle-dance.py @@ -87,6 +87,9 @@ def matchings(l): random.shuffle(result) for i in range(len(result)): random.shuffle(result[i]) + for j in len(result[i]): + if random.randrange(2) == 0: + result[i][j] = (result[i][j][1], result[i][j][0]) result = [matching for matching in result if all((min(match[0].id,match[1].id), max(match[0].id,match[1].id)) not in block_pairs for match in matching)] return result