Пример #1
0
bool Nodo::operator<(const Nodo &nodo) const {
	unsigned int Score = 0;
	unsigned int hScore = 0;
	Score = nodo.getGScore() + nodo.getHScore();
	if ((HScore + GScore) < Score) {
		return true;
	} else {
		Score = nodo.getHScore();
		if ((HScore < Score)&&(Score==(GScore+HScore))) {
			return true;
		}
	}
	return false;
}
Пример #2
0
Nodo::Nodo(const Nodo& nodo) {
	nodo.getPos(posX, posY);
	nodo.getPosP(posXP, posYP);
	GScore = nodo.getGScore();
	HScore = nodo.getHScore();
}