Removed redundant pickWeightedAffinity function

This commit is contained in:
Marcin Kostrzewski 2020-05-18 14:29:26 +02:00
parent dc5dc756cb
commit 3e4f10236d

View File

@ -24,12 +24,3 @@ class Affinities:
:return: List of weights
"""
return [self.food, self.water, self.rest]
def pickWeightedAffinity(affinities: Affinities):
population = [Classifiers.FOOD, Classifiers.WATER, Classifiers.REST]
weights = affinities.getWeigths()
return random.choices(population, weights)[0]