Madra_smieciarka/classes/Household.py

25 lines
589 B
Python

class Household:
def __init__(self, id, image, position):
self.id = id
self.image = image
assert isinstance(position, tuple)
self.position = position
self.neighbours = []
def setNeighbours(self, neighbours):
self.neighbours = neighbours
def addNeighbour(self, neighbour):
self.neighbours.append(neighbour)
def getNeighbours(self):
return self.neighbours
def getPosition(self):
return self.position
def getImage(self):
return self.image
def getId(self):
return self.id