From 93839b3580f4ee992b76738786e721be0107d3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sat, 23 May 2020 23:48:10 +0200 Subject: [PATCH] Add field for associated interactable in dt interactable class --- .../DTEntities/DTSurvivalInteractable.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AI/DecisionTrees/projectSpecificClasses/DTEntities/DTSurvivalInteractable.py b/src/AI/DecisionTrees/projectSpecificClasses/DTEntities/DTSurvivalInteractable.py index d5c153b..b5a8708 100644 --- a/src/AI/DecisionTrees/projectSpecificClasses/DTEntities/DTSurvivalInteractable.py +++ b/src/AI/DecisionTrees/projectSpecificClasses/DTEntities/DTSurvivalInteractable.py @@ -7,7 +7,9 @@ from src.entities.Interactable import Interactable class DTSurvivalInteractable: DistFromObjectFromPlayer: DistFromObject - def __init__(self, distanceFromPlayer: DistFromObject, classification: SurvivalClassification): + def __init__(self, distanceFromPlayer: DistFromObject, classification: SurvivalClassification, + interactable: Interactable): + self.interactable = interactable self.classification = classification self.distanceFromPlayer = distanceFromPlayer @@ -36,4 +38,4 @@ class DTSurvivalInteractable: else: return None - return DTSurvivalInteractable(distanceFromPlayer, classification) + return DTSurvivalInteractable(distanceFromPlayer, classification, interactable)