From 199fa3f25d4ce8be0edc14dd1f606f40f6f93475 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Sun, 21 Jul 2024 01:59:48 -0600 Subject: [PATCH] Mods --- cromulant/ants.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cromulant/ants.py b/cromulant/ants.py index f6ef08e..b44dc8e 100644 --- a/cromulant/ants.py +++ b/cromulant/ants.py @@ -2,6 +2,7 @@ from __future__ import annotations import re import random +import itertools from typing import ClassVar, Any from .config import Config @@ -259,9 +260,10 @@ class Ants: name = "" names = Ants.get_names() + combinations = list(itertools.product(words_1, words_2)) - for _ in range(12): - name = f"{random.choice(words_1)} {random.choice(words_2)}" + for combo in combinations: + name = f"{combo[0]} {combo[1]}" if (name == ant_1.name) or (name == ant_2.name): continue