def get_center(self):
        x = 0
        y = 0
        amount = 0
        for id in self.ids:
            cell = self.game.get_cell(id)
            if cell:
                x += cell.x
                y += cell.y
                amount += 1
        amount = max(1, amount)  # prevent div by zero
        return x/amount, y/amount
dataset/ETHPy150Open Raeon/pygar/bot.py/Bot.get_center/original