// Holds information about a tracked robot
// Also includes "point.cpp" and "grid.cpp" which are used here and in "main.cpp"

#include "point.cpp"
#include "grid.cpp"

#include "cv.h"

class CheifRobot
{

public:

	int commID;
	point colorTarget;
	point colorRange;
	cellID curLocation;
	cellID lastLocation;
	CvScalar debugColor;

	CheifRobot (int id, CvScalar color )
	{
		commID = id;
		debugColor = color;
	}
		
	int setColorTarget(int h, int s, int v)
	{
		colorTarget.h = h;
		colorTarget.s = s;
		colorTarget.v = v;
		
		return 0;
	}

	int setColorRange(int h, int s, int v)
	{
		colorRange.h = h;
		colorRange.s = s;
		colorRange.v = v;
		
		return 0;
	}

	int updateLocation(cellID newID)
	{
		lastLocation.i = curLocation.i;
		lastLocation.j = curLocation.j;

		curLocation.i = newID.i;
		curLocation.j = newID.j;

		return 0;
	}

	bool changedLocation()
	{
		if (curLocation != lastLocation)
			return true;
		else
			return false;
	}





};