added missing javadocs in the NetworkDialog.java
This commit is contained in:
		
						parent
						
							05271beded
						
					
				
				
					commit
					961242bb20
				
			@@ -92,6 +92,9 @@ private void connectServer() {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method will start a server or just connect to one based on the boolean hostServer
 | 
			
		||||
     */
 | 
			
		||||
    private void connect() {
 | 
			
		||||
        if(hostServer){
 | 
			
		||||
            startServer();
 | 
			
		||||
@@ -106,13 +109,16 @@ private void connect() {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method starts a server in a new thread
 | 
			
		||||
     */
 | 
			
		||||
    private void startServer() {
 | 
			
		||||
        new Thread(() -> {
 | 
			
		||||
            try{
 | 
			
		||||
                BattleshipServer battleshipServer = new BattleshipServer();
 | 
			
		||||
                battleshipServer.run();
 | 
			
		||||
            } catch (Exception e) {
 | 
			
		||||
                LOGGER.log(Level.ERROR,e);
 | 
			
		||||
                LOGGER.log(Level.ERROR, e.getMessage(), e);
 | 
			
		||||
            }
 | 
			
		||||
        }).start();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user