minor tweaks to make the code pass the check style
This commit is contained in:
		
						parent
						
							52673dfbce
						
					
				
				
					commit
					ecbe486d3b
				
			@@ -9,7 +9,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Specifies the map used by the opponent in single mode.
 | 
					# Specifies the map used by the opponent in single mode.
 | 
				
			||||||
# Single mode is activated if this property is set.
 | 
					# Single mode is activated if this property is set.
 | 
				
			||||||
map.opponent=maps/map2.json
 | 
					#map.opponent=maps/map2.json
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Specifies the map used by the player in single mode.
 | 
					# Specifies the map used by the player in single mode.
 | 
				
			||||||
# The player must define their own map if this property is not set.
 | 
					# The player must define their own map if this property is not set.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,7 +45,7 @@ public class BattleshipServer implements MessageListener<HostedConnection>, Conn
 | 
				
			|||||||
    private static final Logger LOGGER = System.getLogger(BattleshipServer.class.getName());
 | 
					    private static final Logger LOGGER = System.getLogger(BattleshipServer.class.getName());
 | 
				
			||||||
    private static final File CONFIG_FILE = new File("server.properties");
 | 
					    private static final File CONFIG_FILE = new File("server.properties");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static int PORT;
 | 
					    private static int port;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private final BattleshipConfig config = new BattleshipConfig();
 | 
					    private final BattleshipConfig config = new BattleshipConfig();
 | 
				
			||||||
    private Server myServer;
 | 
					    private Server myServer;
 | 
				
			||||||
@@ -69,7 +69,7 @@ public class BattleshipServer implements MessageListener<HostedConnection>, Conn
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public BattleshipServer(int port) {
 | 
					    public BattleshipServer(int port) {
 | 
				
			||||||
        config.readFromIfExists(CONFIG_FILE);
 | 
					        config.readFromIfExists(CONFIG_FILE);
 | 
				
			||||||
        PORT = port;
 | 
					        BattleshipServer.port = port;
 | 
				
			||||||
        LOGGER.log(Level.INFO, "Configuration: {0}", config); //NON-NLS
 | 
					        LOGGER.log(Level.INFO, "Configuration: {0}", config); //NON-NLS
 | 
				
			||||||
        logic = new ServerGameLogic(this, config);
 | 
					        logic = new ServerGameLogic(this, config);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -83,7 +83,7 @@ public void run() {
 | 
				
			|||||||
    private void startServer() {
 | 
					    private void startServer() {
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            LOGGER.log(Level.INFO, "Starting server..."); //NON-NLS
 | 
					            LOGGER.log(Level.INFO, "Starting server..."); //NON-NLS
 | 
				
			||||||
            myServer = Network.createServer(PORT);
 | 
					            myServer = Network.createServer(port);
 | 
				
			||||||
            initializeSerializables();
 | 
					            initializeSerializables();
 | 
				
			||||||
            myServer.start();
 | 
					            myServer.start();
 | 
				
			||||||
            registerListeners();
 | 
					            registerListeners();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,5 +51,5 @@ default void receivedEvent(ClientStateEvent event) { /* do nothing */ }
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param event the received Event
 | 
					     * @param event the received Event
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    default void receivedEvent(MusicEvent event) { /* do nothing */ };
 | 
					    default void receivedEvent(MusicEvent event) { /* do nothing */ }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user