package taurus.util;

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

public class WinCardType {

	public static final int QIXIAODUI = 1; //七小对多少分?

	public static final int JIANGJIANGHU = 2; //将将胡多少分?

	public static final int QINGYISE = 3;	//清一色多少分?

	public static final int PENGPENGHU = 4; //碰碰胡多少分？

	public static final int GANGSHANGHUA = 5; //杠上花多少分？

	public static final int GANGSHANGPAO = 6; //杠上炮多少分？

	public static final int QUANQIUREN = 7; //全求人多少分?

	public static final int HAIDI = 8; //海底多少分？

	public static final int HAIDIPAO = 9; //海底炮多少分?

	public static final int QIANG_GANG_HU =10; //抢杠胡?

	public static final int XIAOHU = 11;

	public final static int TYPE_TIANHU = 12;

	public final static int TYPE_TIANTINGHU = 13;

	public final static int TYPE_MENQING = 14;
	
	public final static int TYPE_LIULIUSHUN  = 21;

	public final static int TYPE_DASIXI  = 22;

	public final static int TYPE_QUEYISE  = 23;

	public final static int TYPE_BANBANHU  = 24;

	public final static int TYPE_JIEJIEGAO  = 25;

	public final static int TYPE_SANTONG  = 26;
	

	public final static int TYPE_YIZHIHUA  = 27;

	public final static int WIN_TYPE_SCORE = 7;
	public final static int WIN_PING_TYPE_SCORE = 3;

	public int type;
	
	public int value;

	public int score;
	
	public ITArray opcard;

	public WinCardType(int type, int value, int score) {
		this.type = type;
		this.value = value;
		this.score = score;
	}

	public ITObject toTObject() {
		return toTObject(false);
	}
	
	public ITObject toTObject(boolean is_opcard) {
		ITObject obj = TObject.newInstance();
		obj.putInt("type", type);
		obj.putInt("value", value);
		if(is_opcard&&opcard!=null) {
			obj.putTArray("opcard", opcard);
		}
		return obj;
	}

	public String toString() {
		return "type:" + type + " value:" + value;

	}
}