public function equal(Condition $c1, Condition $c2) { if (!$c1 instanceof Difficulty || !$c2 instanceof Difficulty) { throw new IncomparableConditions(); } return $c1->isEasy() === $c2->isEasy() && $c1->isNormal() === $c2->isNormal() && $c1->isHard() === $c2->isHard(); }