public void close() {

        if (USE_INTERNET) {
            try {
                AddressProvider.disconnect();
            } catch (MalformedURLException ex) {
                System.err.println("Could not discconnect correctly... MalformedURLException.");
            } catch (IOException ex) {
                System.err.println("Could not discconnect correctly... IOException.");
            }
        }

        if (gameClient != null) {
            gameClient.close();
        }

        if (gameServer != null) {
            gameServer.close();
        }

        if (padServer != null) {
            padServer.closeConnection();
        }
    }