#pragma once
#include "Suit.h"
#include "Coat.h"
#include "Pants.h"

class SuitFactory
{
private:
	static SuitFactory *_instance;
	int contId;
public:
	static SuitFactory* instance();

	Suit createNewSuit()
	{
		int id = contId++;
		Suit suit = Suit(id);
		Pants pants = Pants(id);
		Coat coat = Coat(id);

		suit.setPants(pants);
		suit.setCoat(coat);

		return suit;
	}

	bool isSameSuit(Coat coat, Pants pants)
	{
		if (coat.getId() == pants.getId())
			return true;
		return false;
	}

	Suit agregateSuit(Coat coat, Pants pants)
	{
		Suit suit = Suit(coat.getId());
		suit.setCoat(coat);
		suit.setPants(pants);

		return suit;
	}


	SuitFactory()
	{
		contId = 0;
	}

};