package robot.mj;

import java.util.Map;

import com.robot.GameController;
import com.robot.Global;
import com.robot.MainServer;
import com.robot.data.Player;
import com.robot.data.Room;
import com.robot.player.state.PlayerWaitState;
import com.robot.room.state.RoomStartGameState;


/**
 * 
 * 
 */
public class EXMainServer extends MainServer{
	
	

	
	@Override
	public void onStart() {
		super.onStart();
		System.out.println("机器人已启动");

		registerState();

		//安排机器人
		loadRobots();
	}

	/*
		安排对应的游戏的机器人
	 */
	private final void loadRobots(){
		System.out.println("load Robots");
		//1、读取redis2 对应的设置机器人

	}
	
	private final void registerState() {

	}


	@Override
	public Room newRoom(String roomid, Map<String, String> redis_room_map) {
		// TODO Auto-generated method stub
		return new EXRoom(roomid, redis_room_map);
	}


	@Override
	public Player newPlayer(int playerid, Room room, String session_id) {
		// TODO Auto-generated method stub
		return new EXPlayer(playerid, room, session_id);
	}


	@Override
	protected GameController newController() {
		// TODO Auto-generated method stub
		return new EXGameController();
	}
}
