from classes.interactable import Interactable import pygame import prefs from classes.agent import Agent class BeerKeg(Interactable): def __init__(self, cell, name, sprite="sprites/BeerKeg.png"): super().__init__(cell, sprite) self.sprite = pygame.image.load(sprite).convert_alpha() self.sprite = pygame.transform.scale(self.sprite, (prefs.CELL_SIZE, prefs.CELL_SIZE)) self.name = name def interact(self,agent): if not isinstance(agent, Agent): print("Agent must be of type Agent") return agent.increase_score(10) print("Agent interacted with {}".format(self.name))