private function isIdealOver(Evaluation $a, Evaluation $b): bool
    {
        $ideal = $this->type == NodeType::MIN()
            ? Evaluation::getWorstComparator()
            : Evaluation::getBestComparator();
        $idealEvaluationResult = $ideal($a, $b);
        return $idealEvaluationResult > 0;
    }
private function isIdealOver(Evaluation $a, Evaluation $b): bool
    {
        $ideal = $this->type == NodeType::MIN()
            ? Evaluation::getWorstComparator()
            : Evaluation::getBestComparator();
        $idealEvaluationResult = $ideal($a, $b);
        return $idealEvaluationResult > 0;
    }
private function isIdealOver ( Evaluation $ a , Evaluation $ b ) : bool { $ ideal = $ this -> type == NodeType :: MIN ( ) ? Evaluation :: getWorstComparator ( ) : Evaluation :: getBestComparator ( ) ; $ idealEvaluationResult = $ ideal ( $ a , $ b ) ; return $ idealEvaluationResult > 0 ; }
Compare two evaluations
The meaning of "best" is decided by the "ideal" member variable
comparator
Compare two evaluations The meaning of best is decided by the ideal member variable comparator