package com.backfire.arithmetic;

import com.backfire.arithmetic.CardJudge.CardType;

/**
 * 判牌返回牌类型
 */
public class CardReturn {
	/**牌类型**/
	public CardType mCardType;
	/**牌head**/
	public Card mCardHead;
	public Card mCardCopy;
	/**牌的数量**/
	public int mCardNum;

	public CardReturn() {
		mCardType = CardType.CardEnd;
		mCardHead = new Card(Card.Club, Card.PointError);
		mCardCopy=new Card();
		mCardNum=0;
	}

	public void clear() {
		mCardHead = null;
	}

	public void copy(CardType type, final Card pCard, int cardNum) {
		mCardNum = cardNum;
		//mCardCopy.setColor(pCard.getColor());
		//mCardCopy.setPoint(pCard.getPoint());
		mCardHead.setColor(pCard.getColor()); 
		mCardHead.setPoint(pCard.getPoint()); 
		mCardType = type;
	}
	
	@Override
	public String toString() {
		return "CardReturn [mCardType=***" + mCardType +"***,mCardHead="+mCardHead.toString() 
				+ ", mCardNum=***"+ mCardNum + "***]";
	}
};
