#include <stdio.h>
#include <stdlib.h>
#include "BBangHouse.h"
#include "MuckBBang.h"
#include "SickBBang.h"
#include "MoolBBang.h"
#include "SoolBBang.h"

void main()
{
	BBangHouse *pHouse = new BBangHouse();

	for(int i = 0; i < 10; i++) {
		char buffer[BUFSIZ];
		int id = (int)rand();
		int category = (id % 3) + 1;
		id = id % 100;
		sprintf_s(buffer,"ID%d",id,BUFSIZ);
		MuckBBang *pBBang = NULL;

		switch(category) {
			case ID_SICKBBANG:
				pBBang = new SickBBang(buffer);
				break;
			case ID_MOOLBBANG:
				pBBang = new MoolBBang(buffer);
				break;
			case ID_SOOLBBANG:
				pBBang = new SoolBBang(buffer);
				break;
		}
		pHouse->join(pBBang);
	}
	pHouse->run();
	pHouse->print();

	delete pHouse;
}