#include "CandyCane.h"

CandyCane::CandyCane(int xx, int yy)
{
	x = xx;
	y = yy;
}

std::vector<CandyCane*> candies;
CandyCane *candyAt(int xx, int yy)
{
	for(int i=0;i<candies.size();i++)
	{
		if (candies.at(i)->x == xx && candies.at(i)->y == yy)
			return candies.at(i);
	}
	return NULL;
}

void removeCandy(CandyCane *candy)
{
	for(int i=0;i<candies.size();i++)
	{
		if (candies.at(i) == candy)
		{
			delete candy;
			candies.erase(candies.begin()+i);
			return;
		}
	}
}