package extend.zp.tip;

import com.taurus.core.entity.ITArray;
import com.taurus.core.entity.ITObject;
import com.taurus.core.entity.TObject;


public class Tip {
	public int			id;
	public IRuleBase	rule;
	public int			weight;
	public int			card;
	public ITArray		opcard;
	public int			type;
	public ITArray		bi_list;
	public ITArray 	biid;

	public Tip(int card, ITArray opcard, int weight, IRuleBase rule, int type) {
		this.rule = rule;
		this.weight = weight;
		this.opcard = opcard;
		this.card = card;
		this.type = type;
	}

	public ITObject toMP() {
		ITObject tipMp = new TObject();
		tipMp.putInt("id", id);
		tipMp.putInt("weight", weight);
		tipMp.putInt("type", type);
		tipMp.putInt("card", card);
		tipMp.putTArray("opcard", opcard);
		if(bi_list!=null&&bi_list.size()>0) {
			tipMp.putTArray("bi_list", bi_list);
		}
		return tipMp;
	}
}
