From 9484a05dd5ca56c635578170133c5600982021be Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sat, 16 May 2020 12:54:21 +0200 Subject: [PATCH] Added walking affinity weight --- src/AI/Affinities.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/AI/Affinities.py b/src/AI/Affinities.py index 01ec59e..795895f 100644 --- a/src/AI/Affinities.py +++ b/src/AI/Affinities.py @@ -4,18 +4,25 @@ from src.entities.Enums import Classifiers class Affinities: - def __init__(self, food, water, rest): + def __init__(self, food, water, rest, walking): """ Create a container of affinities. Affinities describe, what type of entities a player prioritizes. :param food: Food affinity :param water: Freshwater affinity :param rest: Firepit affinity + :param walking: How distances determine choices """ self.food = food self.water = water self.rest = rest + self.walking = walking def getWeigths(self): + """ + Get a list of all affinities except walking. + + :return: List of weights + """ return [self.food, self.water, self.rest]