def processLayoutChar(self, x, y, layoutChar):
    if (layoutChar == '%'):
        self.walls[x][y] = True
    elif (layoutChar == '.'):
        self.food[x][y] = True
    elif (layoutChar == 'o'):
        self.capsules.append((x, y))
    elif (layoutChar == 'P'):
        self.agentPositions.append((0, (x, y)))
    elif (layoutChar in ['G']):
        self.agentPositions.append((1, (x, y)))
        self.numGhosts += 1
    elif (layoutChar in ['1', '2', '3', '4']):
        self.agentPositions.append((int(layoutChar), (x, y)))
        self.numGhosts += 1
def processLayoutChar(self, x, y, layoutChar):
    if (layoutChar == '%'):
        self.walls[x][y] = True
    elif (layoutChar == '.'):
        self.food[x][y] = True
    elif (layoutChar == 'o'):
        self.capsules.append((x, y))
    elif (layoutChar == 'P'):
        self.agentPositions.append((0, (x, y)))
    elif (layoutChar in ['G']):
        self.agentPositions.append((1, (x, y)))
        self.numGhosts += 1
    elif (layoutChar in ['1', '2', '3', '4']):
        self.agentPositions.append((int(layoutChar), (x, y)))
        self.numGhosts += 1