#pragma once
#include "Event.h"
#include "Coat.h"
#include "SuitProcessor.h"

class ProcessCoat: public Event
{
public:
	ProcessCoat(double time):Event(time){}

	void Event::action()
	{
		SimulatorSingleton *sim = SimulatorSingleton::instance();

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

		bool flawed;

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

		coat.setFlawed(flawed);

		SuitProcessor *suitProcessor = SuitProcessor::instance();
		suitProcessor->addCoatToStack(coat, getTime());

	}

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

	Coat coat;
};