package extend.zp.room.state;


import com.game.Global;
import com.game.data.Player;
import com.game.state.StateBase;

import extend.zp.EXMainServer;
import extend.zp.EXRoom;
import extend.zp.player.state.EXPlayerDrawState;


public class EXRoomSetpState extends StateBase<EXRoom> {

	@Override
	public void enter(EXRoom owner) {
		
		
		Player player;
		if (owner.activeSeat == 0) {
			player = owner.playerMapBySeat.get(owner.bankerSeat);

		} else {
			player = owner.playerMapBySeat.get(owner.activeSeat);
			int nextSeat = player.nextSeat;
			player = owner.playerMapBySeat.get(nextSeat);

		}

		EXMainServer.gameCtr.changeActiveSeat(owner,player.seat);

		player.stateMachine.changeState(Global.getState(EXPlayerDrawState.class));
		
		
	}

}
