#pragma once
#include "Event.h"
#include "Pants.h"
#include "ProcessPants.h"
#include "SuitProcessor.h"

class ProcessPants: public Event
{
public:
ProcessPants(double time):Event(time){}
	void Event::action()
	{
		SimulatorSingleton *sim = SimulatorSingleton::instance();

		double auxFlawed = sim->rStreamManager->rStream9->uniform(0,1);

		bool flawed;

		if (auxFlawed < 0.1)
			flawed = true;
		else
			flawed = false;

		pants.setFlawed(flawed);

		SuitProcessor *suitProcessor = SuitProcessor::instance();
		suitProcessor->addPantsToStack(pants, getTime());
	}

	int Event::getType()
	{
		return 3;
	}

	Pants pants;
};