예제 #1
0
파일: player.cpp 프로젝트: LSHyun/Dominion
//============================================================================
// Name        : gainCard()
// Author      : LSH
// Version     : 1.1
// Param       : ahand, adeck, adiscard
// Return      : NULL
// Deprecated  : Using
// See         : card.cpp/ActionBureaucrat
// Todo        : Gain card some card
// Bug         : No bug
//============================================================================
void Player::gainCard(Card c, int count, place dest) {
	for(int i=0;i<count;i++){
		cout << c.GetName() << ", " << c.GetCost() << endl;
		if(dest ==DISCARD){
			adiscard.push_back(c);
		}
		else if(dest == HAND){
			ahand.push_back(c);
		}
		else if(dest == DECK){
			adeck.push_front(c);
		}
		cout << "name : " << c.GetName() << endl;
	}
};
예제 #2
0
파일: player.cpp 프로젝트: LSHyun/Dominion
//============================================================================
// Name        : GainCard()
// Author      : LSH
// Version     : 1.1
// Param       : ahand, adeck, adiscard
// Return      : NULL
// Deprecated  : Using
// See         : card.cpp/ActionBureaucrat
// Todo        : Gain card some card
// Bug         : No bug
//============================================================================
void Player::GainCard(string name, int count, place dest){
	for(int i=0;i<count;i++){
		Card *c = new Card;
		c->SetCard(name);
		cout << c->GetName() << ", " << c->GetCost() << endl;
		if(dest ==DISCARD){
			adiscard.push_back(*c);
		}
		else if(dest == HAND){
			ahand.push_back(*c);
		}
		else if(dest == DECK){
			adeck.push_front(*c);
		}
		cout << "name : " << c->GetName() << endl;
	}
};