2024-04-15 10:43:01 +02:00
|
|
|
from classes.interactable import Interactable
|
|
|
|
import pygame
|
|
|
|
import prefs
|
|
|
|
from classes.agent import Agent
|
|
|
|
class Table(Interactable):
|
|
|
|
|
|
|
|
def __init__(self, cell, name, sprite="sprites/table.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))
|
2024-04-15 22:39:31 +02:00
|
|
|
cell.blocking_movement = True
|
2024-04-15 10:43:01 +02:00
|
|
|
self.name = name
|
|
|
|
|
|
|
|
def interact(self,agent):
|
|
|
|
if not isinstance(agent, Agent):
|
|
|
|
print("Agent must be of type Agent")
|
|
|
|
return
|
|
|
|
|