@Override
	public void gerenciaMsgsTCP(String msg){

		Logger.log("ProtocolGameRoom(TCP): "+msg);

		if(msg.startsWith(PREFIX_RESPONSE_SNAKE_ROOMS)){

			ApplicationRoom snakeRooms = new ApplicationRoom(PREFIX_SNAKE);

			String[] parts = msg.substring(PREFIX_RESPONSE_SNAKE_ROOMS.length()+1).split(" ");

			for(String part: parts){

				String[] info = part.split(",");

				String gameName = info[0];
				String roomID = info[1];
				String owner = info[2];
				int privacy = Integer.parseInt(info[3]);
				int currentPlayers = Integer.parseInt(info[4]);
				int maxPlayers = Integer.parseInt(info[5]);

				snakeRooms.add(new GameRoom(gameName, roomID, owner, privacy,currentPlayers,maxPlayers));
			}

			rooms.put(PREFIX_SNAKE, snakeRooms);

		}

		if(msg.startsWith(PREFIX_RESPONSE_DAVE_ROOMS)){
			ApplicationRoom daveRooms = new ApplicationRoom(PREFIX_DAVE);
			daveRooms.add(new GameRoom(PREFIX_DAVE,"...","Peach",0,1,3));
			rooms.put(PREFIX_DAVE, daveRooms);
		}

		if(msg.startsWith(PREFIX_RESPONSE_ALL_ROOMS)){
			//Little more Complex
		}

		if(msg.startsWith(PREFIX_RESPONSE_MAY_ENTER_ROOM)){

			String[] parts = msg.split(" ");
			String ticket = parts[1];

			String prefix = parts[2];
			String roomID = parts[3];

			createApplicationRoom(prefix, ticket, roomID);

			//requestJoinRoom(prefix, roomID);

			Logger.log("cliente com ticket:"+ticket+" foi inserido em: "+prefix+" "+roomID);

		}else if(msg.startsWith(PREFIX_RESPONSE_MAY_JOIN_ROOM)){

			String[] parts = msg.split(" ");

			String roomID = parts[1];
			int privacy = Integer.parseInt(parts[2]);
			int maxPlayers = Integer.parseInt(parts[3]);
			int currentPlayers = Integer.parseInt(parts[4]);

			List<String> names = new ArrayList<String>(maxPlayers);
			List<String> avatars = new ArrayList<String>(maxPlayers);

			for(int i=0;i<currentPlayers;i++){
				names.add(parts[5+i*2]);
				avatars.add(parts[6+i*2]);
			}			 

			joinApplicationRoom(roomID, privacy, currentPlayers, maxPlayers, names, avatars);

		}else{

			//GameRooms Logic

			String[] parts = msg.split(" ");

			String prefix = parts[0];

			ApplicationRoom room = rooms.get(prefix);


			if(room!=null){
				//if(msg.startsWith(PREFIX_BYPASS_ROOM)){

				//String[] parts = msg.split(" ");

				String roomID = parts[1];

				/*Logger.log("MSG: "+msg);
			Logger.log("roomID: "+roomID);*/

				String submessage = msg.substring(prefix.length()+1+roomID.length()+1);

				Logger.log("subProtocol.gerenciaTCP("+submessage+")");

				ProtocolGame subProtocol = rooms.get(prefix).getProtocols().get(roomID);

				subProtocol.gerenciaMsgsTCP(submessage);


			}else{
				Logger.log("Wrong Room: "+prefix);
			}
		}

	}