package extend.mj.player.state;

import com.taurus.core.entity.ITObject;

import extend.mj.EXActionEvent;
import extend.mj.EXPlayer;

/**
 * 
 */
public class EXPlayerKongWinState extends EXPlayerTipState{
	
	@Override
	public void enter(EXPlayer owner) {
		super.enter(owner);
		owner.getRoom().tipMap.put(owner.playerid, owner.tipMgr);

	}

	@Override
	public void exit(EXPlayer owner) {
		super.exit(owner);
		owner.getRoom().tipMap.remove(owner.playerid);

	}
	
//	protected void winOpt(Tip tip) {
//		tip.winMap.remove(WinCardType.XIAOHU);
//		tip.winMap.put(WinCardType.QIANG_GANG_HU, new WinCardType(WinCardType.QIANG_GANG_HU, 1,6));
//	}
	
	@Override
	public void execute(EXPlayer owner, String cmd, int gid, Object param) {
		if (cmd.equals(EXActionEvent.EVENT_ACTION)) {
			ITObject netParam = (ITObject) param;
			int id = netParam.getInt("id");
//			if(id!=0) {
//				Tip tip = owner.tipMgr.tipMap.get(id);
//				if(tip.weight == RuleWeight.WIN) {
//					winOpt(tip);
//				}
//			}
			
			owner.tipMgr.choicAction(id);
		}
	}

}
