def getOptimalPointAdvantageForNode(self, node):
        if node.children:
            for child in node.children:
                child.pointAdvantage = \
                    self.getOptimalPointAdvantageForNode(child)

            # If the depth is divisible by 2,
            # it's a move for the AI's side, so return max
            if 2 % node.children[0].depth == 1:
                return(max(node.children).pointAdvantage)
            else:
                return(min(node.children).pointAdvantage)
        else:
            return node.pointAdvantage
dataset/ETHPy150Open marcusbuffett/command-line-chess/build/lib/chess/AI.py/AI.getOptimalPointAdvantageForNode/swapped operands of `%`