public function fulfillConditions($entry = null)
    {
        foreach ($this->getConditions() as $condition) {
            if ($condition->getAttribute() == MissionGameCondition::NONE) {
                continue;
            }
    
            // On passe au suivant si on a gagné
            if ($condition->getAttribute() == MissionGameCondition::VICTORY) {
                if (!$entry || !$entry->getWinner()) {
                    return false;
                }
            }
    
            // On passe au suivant si on a perdu
            if ($condition->getAttribute() == MissionGameCondition::DEFEAT) {
                if (!$entry || $entry->getWinner()) {
                    return false;
                }
            }
    
            // On passe au suivant si on a plus de n points
            if ($condition->getAttribute() == MissionGameCondition::GREATER) {
                if (!$entry || !($entry->getPoints() >= $condition->getValue())) {
                    return false;
                }
            }
    
            // On passe au suivant si on a moins de n points
            if ($condition->getAttribute() == MissionGameCondition::LESS) {
                if (!$entry || !($entry->getPoints() < $condition->getValue())) {
                    return false;
                }
            }
        }

        return true;
    }
public function fulfillConditions($entry = null)
    {
        foreach ($this->getConditions() as $condition) {
            if ($condition->getAttribute() == MissionGameCondition::NONE) {
                continue;
            }
    
            // On passe au suivant si on a gagné
            if ($condition->getAttribute() == MissionGameCondition::VICTORY) {
                if (!$entry || !$entry->getWinner()) {
                    return false;
                }
            }
    
            // On passe au suivant si on a perdu
            if ($condition->getAttribute() == MissionGameCondition::DEFEAT) {
                if (!$entry || $entry->getWinner()) {
                    return false;
                }
            }
    
            // On passe au suivant si on a plus de n points
            if ($condition->getAttribute() == MissionGameCondition::GREATER) {
                if (!$entry || !($entry->getPoints() >= $condition->getValue())) {
                    return false;
                }
            }
    
            // On passe au suivant si on a moins de n points
            if ($condition->getAttribute() == MissionGameCondition::LESS) {
                if (!$entry || !($entry->getPoints() < $condition->getValue())) {
                    return false;
                }
            }
        }

        return true;
    }
public function fulfillConditions ( $ entry = null ) { foreach ( $ this -> getConditions ( ) as $ condition ) { if ( $ condition -> getAttribute ( ) == MissionGameCondition :: NONE ) { continue ; } // On passe au suivant si on a gagné if ( $ condition -> getAttribute ( ) == MissionGameCondition :: VICTORY ) { if ( ! $ entry || ! $ entry -> getWinner ( ) ) { return false ; } } // On passe au suivant si on a perdu if ( $ condition -> getAttribute ( ) == MissionGameCondition :: DEFEAT ) { if ( ! $ entry || $ entry -> getWinner ( ) ) { return false ; } } // On passe au suivant si on a plus de n points if ( $ condition -> getAttribute ( ) == MissionGameCondition :: GREATER ) { if ( ! $ entry || ! ( $ entry -> getPoints ( ) >= $ condition -> getValue ( ) ) ) { return false ; } } // On passe au suivant si on a moins de n points if ( $ condition -> getAttribute ( ) == MissionGameCondition :: LESS ) { if ( ! $ entry || ! ( $ entry -> getPoints ( ) < $ condition -> getValue ( ) ) ) { return false ; } } } return true ; }
Are the conditions linked to this game fulfilled ?

@return boolean
Are the conditions linked to this game fulfilled ?