Added walking affinity weight

This commit is contained in:
Marcin Kostrzewski 2020-05-16 12:54:21 +02:00
parent 30e1db94bf
commit 9484a05dd5

View File

@ -4,18 +4,25 @@ from src.entities.Enums import Classifiers
class Affinities: 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. Create a container of affinities. Affinities describe, what type of entities a player prioritizes.
:param food: Food affinity :param food: Food affinity
:param water: Freshwater affinity :param water: Freshwater affinity
:param rest: Firepit affinity :param rest: Firepit affinity
:param walking: How distances determine choices
""" """
self.food = food self.food = food
self.water = water self.water = water
self.rest = rest self.rest = rest
self.walking = walking
def getWeigths(self): def getWeigths(self):
"""
Get a list of all affinities except walking.
:return: List of weights
"""
return [self.food, self.water, self.rest] return [self.food, self.water, self.rest]