mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-07-31 09:37:40 +02:00
Gui v1.0
This commit is contained in:
@@ -18,10 +18,11 @@ import com.simsilica.lemur.style.ElementId;
|
||||
|
||||
import static pp.battleship.Resources.lookup;
|
||||
import pp.battleship.client.gui.GameMusic;
|
||||
import pp.battleship.client.gui.VolumeSlider;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.dialog.StateCheckboxModel;
|
||||
import pp.dialog.TextInputDialog;
|
||||
import pp.battleship.client.gui.VolumeSlider;
|
||||
|
||||
import static pp.util.PreferencesUtils.getPreferences;
|
||||
|
||||
/**
|
||||
|
@@ -7,24 +7,23 @@
|
||||
|
||||
package pp.battleship.client;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.simsilica.lemur.Button;
|
||||
import com.simsilica.lemur.Container;
|
||||
import com.simsilica.lemur.Label;
|
||||
import com.simsilica.lemur.TextField;
|
||||
import com.simsilica.lemur.component.SpringGridLayout;
|
||||
|
||||
import static pp.battleship.Resources.lookup;
|
||||
import pp.battleship.server.BattleshipServer;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.dialog.DialogBuilder;
|
||||
import pp.dialog.SimpleDialog;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import static pp.battleship.Resources.lookup;
|
||||
|
||||
/**
|
||||
* Represents a dialog for setting up a network connection in the Battleship game.
|
||||
* Allows users to specify the host and port for connecting to a game server.
|
||||
@@ -32,7 +31,7 @@ import static pp.battleship.Resources.lookup;
|
||||
class NetworkDialog extends SimpleDialog {
|
||||
private static final Logger LOGGER = System.getLogger(NetworkDialog.class.getName());
|
||||
private static final String LOCALHOST = "localhost"; //NON-NLS
|
||||
private static final String DEFAULT_PORT = "1234"; //NON-NLS
|
||||
private static final String DEFAULT_PORT = "42069"; //NON-NLS
|
||||
private final NetworkSupport network;
|
||||
private final TextField host = new TextField(LOCALHOST);
|
||||
private final TextField port = new TextField(DEFAULT_PORT);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package pp.battleship.client.gui;
|
||||
|
||||
import com.simsilica.lemur.Slider;
|
||||
|
||||
/**
|
||||
* The VolumeSlider class represents the Volume Slider in the Menu.
|
||||
* It extends the Slider class and provides functionalities for setting the music volume,
|
||||
|
@@ -7,12 +7,11 @@
|
||||
|
||||
package pp.battleship;
|
||||
|
||||
import pp.util.config.Config;
|
||||
|
||||
import static java.lang.Math.max;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import static java.lang.Math.max;
|
||||
import pp.util.config.Config;
|
||||
|
||||
/**
|
||||
* Provides access to the configuration settings for the Battleship game.
|
||||
@@ -31,7 +30,7 @@ public class BattleshipConfig extends Config {
|
||||
* The default port number for the Battleship server.
|
||||
*/
|
||||
@Property("port")
|
||||
private int port = 1234;
|
||||
private int port = 12234;
|
||||
|
||||
/**
|
||||
* The width of the game map in terms of grid units.
|
||||
|
@@ -10,7 +10,7 @@
|
||||
# This file defines the configuration settings for the Battleship server.
|
||||
#
|
||||
# The port number on which the server will listen for incoming connections.
|
||||
port=1234
|
||||
port=42069
|
||||
#
|
||||
# The dimensions of the game map.
|
||||
# 'map.width' defines the number of columns, and 'map.height' defines the number of rows.
|
||||
|
Reference in New Issue
Block a user