From 5d060ae8a416b90abeb6208fd834dc174601ccdb Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sat, 16 May 2020 10:54:31 +0200 Subject: [PATCH] Fixed return type --- src/AI/Affinities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AI/Affinities.py b/src/AI/Affinities.py index b35d505..01ec59e 100644 --- a/src/AI/Affinities.py +++ b/src/AI/Affinities.py @@ -24,5 +24,5 @@ def pickWeightedAffinity(affinities: Affinities): population = [Classifiers.FOOD, Classifiers.WATER, Classifiers.REST] weights = affinities.getWeigths() - return random.choices(population, weights) + return random.choices(population, weights)[0]