def __init__(self, layoutText):
    self.width = len(layoutText[0])
    self.height = len(layoutText)
    self.walls = Grid(self.width, self.height, False)
    self.food = Grid(self.width, self.height, False)
    self.capsules = []
    self.agentPositions = []
    self.numGhosts = 0
    self.processLayoutText(layoutText)
    self.layoutText = layoutText
    self.totalFood = len(self.food.asList())
def __init__(self, layoutText):
    self.width = len(layoutText[0])
    self.height = len(layoutText)
    self.walls = Grid(self.width, self.height, False)
    self.food = Grid(self.width, self.height, False)
    self.capsules = []
    self.agentPositions = []
    self.numGhosts = 0
    self.processLayoutText(layoutText)
    self.layoutText = layoutText
    self.totalFood = len(self.food.asList())