package extend.mj.room.state;

import com.game.Global;
import com.game.state.StateBase;
import com.taurus.core.entity.ITObject;
import com.taurus.core.entity.TObject;

import extend.mj.EXMainServer;
import extend.mj.EXPlayBack;
import extend.mj.EXRoom;

/**
 * ���䷢��״̬
 * 
 *
 * 2017��8��30��
 * EXRoomDealState.java
 */
public class EXRoomDealState extends StateBase<EXRoom> {

	@Override
	public void enter(EXRoom owner) {
		owner.card.init();
		if (owner.bankerSeat == 0) {
			owner.bankerSeat = 1;
		}
//		owner.isplaying = true;
//		owner.round += 1;
		

		this.toNextState(owner);

		
	}

	@Override
	public void toNextState(EXRoom owner) {
		ITObject param = new TObject();
		param.putInt("bank_seat", owner.bankerSeat);
		EXMainServer.gameCtr.dealCard(owner);
		EXMainServer.gameCtr.sendGangZiEvent(owner);
		owner.playBackData = new EXPlayBack(owner);
		owner.stateMachine.changeState(Global.getState(EXRoomSetpState.class));
	}
	
	public void execute(EXRoom owner, String cmd, int gid, Object param) {
	}
}
