Ejemplo n.º 1
0
int JGTVS::getValue(Lotter inLotter) const
{
	int end = 0;
	QList<int> lotters = inLotter.redBall;
	for (size_t i = 0; i < lotters.size(); i++)
	{
		for (size_t j = i + 1; j < lotters.size(); j++)
		{
			if (getTailNumber(lotters.at(i)) == getTailNumber(lotters.at(j)))
			{
				end++;
			}
		}

	}

	return end;
}
Ejemplo n.º 2
0
int JGHVH::getValue(Lotter inLotter) const
{
	int sum = 0;
	for (auto& obj1 : inLotter.redBall)
	{
		sum += getTailNumber(obj1);
	}

	return sum;
}
Ejemplo n.º 3
0
int JGHVHV::getValue(Lotter inLotter) const
{
	JGHVH jghvh;
	jghvh.lotter_list = this->lotter_list;
	if (jghvh.getValue(inLotter) > 10)
	{
		return getTailNumber(jghvh.getValue(inLotter));
	}

	return jghvh.getValue(inLotter);
}
Ejemplo n.º 4
0
int JGHVHV::getValue(int lotter_index) const
{
	JGHVH jghvh;
	jghvh.lotter_list = this->lotter_list;
	if (jghvh.getValue(lotter_index) > 10)
	{
		return getTailNumber(jghvh.getValue(lotter_index));
	}

	return jghvh.getValue(lotter_index);
}
Ejemplo n.º 5
0
int HV::getValue(Lotter inLotter) const
{
	int sum = 0;

	for (auto& obj : inLotter.redBall)
	{
		int obj_w = obj;
		sum += obj_w;
	}

	return getTailNumber(sum);
}
Ejemplo n.º 6
0
//===================================
// find the shortest distance from a
// given node in the list until its end
// used to find the distnace to the new
// number on the screen
//===================================
Point NumberList::shortestDistanceToNewNumber(Point curPoint)const{
	Point p(0, 0), tmpPoint(0, 0);
	unsigned int distance = 999;
	NumberListNode *pTemp;

	for (pTemp = getTailNumber(); pTemp != NULL; pTemp = pTemp->next){
		tmpPoint = pTemp->data.getNumberPosition();
		if (curPoint.pointDistance(tmpPoint) < distance){
			distance = curPoint.pointDistance(tmpPoint);
			p = tmpPoint;
		}
	}

	return p;
}
Ejemplo n.º 7
0
int BLUEV::getValue(Lotter inLotter) const
{
	return getTailNumber(inLotter.greenBall);
}