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() {
|
private void connect() {
|
||||||
if(hostServer){
|
if(hostServer){
|
||||||
startServer();
|
startServer();
|
||||||
@@ -106,13 +109,16 @@ private void connect() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method starts a server in a new thread
|
||||||
|
*/
|
||||||
private void startServer() {
|
private void startServer() {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try{
|
try{
|
||||||
BattleshipServer battleshipServer = new BattleshipServer();
|
BattleshipServer battleshipServer = new BattleshipServer();
|
||||||
battleshipServer.run();
|
battleshipServer.run();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.log(Level.ERROR,e);
|
LOGGER.log(Level.ERROR, e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user