private void handleJoin() throws IOException{
		String WarIDMsg,ArmyNameMsg,SizeMsg;
		List<UnitAndPlace> units = new ArrayList<UnitAndPlace>();
		WarIDMsg = br.readLine();
		ArmyNameMsg = br.readLine();
		SizeMsg = br.readLine();
		StringTokenizer warIDTokenizer = new StringTokenizer(WarIDMsg);
		StringTokenizer armyNameTokenizer = new StringTokenizer(ArmyNameMsg);
		StringTokenizer SizeTokenizer = new StringTokenizer(SizeMsg);
		warIDTokenizer.nextToken(":");
		int warID = Integer.parseInt(warIDTokenizer.nextToken());
		armyNameTokenizer.nextToken(":");
		String armyName = armyNameTokenizer.nextToken();
		SizeTokenizer.nextToken(":");
		//////////////////////////////////////////////////////
		//System.out.println("WarID: "+warID);
		//System.out.println("War: "+ game.getWarInfo(warID).getName());
		//System.out.println("ArmyName: "+ armyName);
		//System.out.println("Units:");
		//////////////////////////////////////////////////////
		int size = Integer.parseInt(SizeTokenizer.nextToken());
		for(int i=0 ; i<size ;i++){
			String unitName,UnitMsg,XMsg,YMsg;
			int x,y; 
			UnitMsg = br.readLine();
			XMsg = br.readLine();
			YMsg = br.readLine();
			StringTokenizer unitTokenizer = new StringTokenizer(UnitMsg);
			StringTokenizer XTokenizer = new StringTokenizer(XMsg);
			StringTokenizer YTokenizer = new StringTokenizer(YMsg);
			unitTokenizer.nextToken(":");
			unitName = unitTokenizer.nextToken();
			XTokenizer.nextToken(":");
			x = Integer.parseInt(XTokenizer.nextToken());
			YTokenizer.nextToken(":");
			y = Integer.parseInt(YTokenizer.nextToken());
			units.add(new UnitAndPlace(unitName, x, y));
			///////////////////////////////////////////////////
			System.out.println("Unit: "+unitName);
			System.out.println("X: " + x);
			System.out.println("Y: " + y);
			/////////////////////////////////////////////////////
		}
		int armyID;
		try {
			armyID = game.regArmy(warID, armyName, units);
			outToClient.writeBytes("ArmyIDMsg"+'\n');
			outToClient.writeBytes("armyID:"+armyID+'\n');
			
		
			/*
			 * este if se realizo con finalidades del test, ya que al no existir una verdadera conexion 
			 * el SocketMock no se comunicara con todos los clientes
			 * ademas de ser parte de algo q no se busca probar aun; en un futuro si se aplicarian 
			 * test sobre este
			 */
			if(!(s instanceof SocketMock)){
				((GameEngineModule) game).net.armyJoined(warID,armyID,armyName);
				ServerNetworkModule.putArmyWarIpMap(new ArmyWarEntry(warID, armyID), s.getInetAddress().getHostAddress());
				updateEnemies(warID,armyID);
			}
			
			
		} catch (WarDoesNotExistException e) {
			outToClient.writeBytes("JOINERROR"+'n');
			outToClient.writeBytes("Code:-103"+'n');
			//e.printStackTrace();
		} catch (WarAlreadyFinishedException e) {
			outToClient.writeBytes("JOINERROR"+'n');
			outToClient.writeBytes("Code:-103"+'n');
			//e.printStackTrace();
		} catch (WarAlreadyStartedException e) {
			outToClient.writeBytes("JOINERROR"+'n');
			outToClient.writeBytes("Code:-103"+'n');
			//e.printStackTrace();
		} catch (InvalidUnitNameException e) {
			outToClient.writeBytes("JOINERROR"+'n');
			outToClient.writeBytes("Code:-103"+'n');
			//e.printStackTrace();
		} catch (PlaceNotFreeToPlaceUnitException e) {
			outToClient.writeBytes("JOINERROR"+'n');
			outToClient.writeBytes("Code:-103"+'n');
			//e.printStackTrace();
		} catch (UnitCoordinatesOutsideMatrixException e) {
			outToClient.writeBytes("JOINERROR"+'n');
			outToClient.writeBytes("Code:-103"+'n');
			//e.printStackTrace();
		}
		
		
		
	}