/* 
 * Tactic is the legal property of its developers, whose names are too numerous 
 * to list here.  Please refer to the COPYRIGHT file distributed with this 
 * source distribution. 
 * 
 * This library is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU Lesser General Public 
 * License as published by the Free Software Foundation; either 
 * version 2.1 of the License, or (at your option) any later version. 
 * 
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
 * Lesser General Public License for more details. 
 * 
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this library; if not, write to the Free Software 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
 *
 * See README for more informations
 *
 * FVIsNotRegrouping.cpp
 *
 * This class is the difference between the force of the ally group and the ennemy group
 *
 * Date 19/03/06
 *
 */

#include "FNIsNotRegrouping.h"
#include "FVIsNotRegrouping.h"
#include "GroupAI.h"

using namespace std;
	
FNIsNotRegrouping::FNIsNotRegrouping(void) {
	name = FN_IS_NOT_REGROUPING;
}

FNIsNotRegrouping::FNIsNotRegrouping(vector<FuzzyValue*> vect) {
	name = FN_IS_NOT_REGROUPING;
	this->setVect(vect);
}

FNIsNotRegrouping::FNIsNotRegrouping(FVIsNotRegrouping* fv1){
	name = FN_IS_NOT_REGROUPING;
	vector<FuzzyValue*> vect = vector<FuzzyValue*>();
	vect.push_back(fv1);
	this->setVect(vect);
}

FNIsNotRegrouping::~FNIsNotRegrouping(void){}

void FNIsNotRegrouping::update(void){
	// à voir
	if(ally->isRegrouped() || ally->getOrderType() != ORDER_REGROUP) value = 1;
	else value = 0;
	notify();
	DebugAI::trace('n', toString());
	
}

void FNIsNotRegrouping::setAlly(GroupAI* ally){
	this->ally = ally;
}
