#include "Servant.h"
#include "MuckBBang.h"

Servant::Servant(void)
{
	nBBang = MAX_BBANG;
}


Servant::~Servant(void)
{
}

int Servant::askAmountToServe(MuckBBang* person)
{
	int n = person->whoAreYou();

	// 이안세한테는 물어보고 자시고 할 거 없음...
	if (n == ID_SOOLBBANG) return 0;

	int amount = person->howManyDoYouWant();

	if (n == ID_MOOLBBANG) return amount;

	if (amount > nBBang) {
		amount = nBBang;
		nBBang = 0;
		return amount;
	}

	nBBang = nBBang - amount;
	return amount;
}