package jrummikub.util; import java.util.UUID; import jrummikub.model.GameSettings; /** * Class summarizing the game data important for unique and sensible network * representation and use */ public class GameData { private UUID gameID; private String host; private GameSettings gameSettings; /** * Creates new game data * * @param gameID * unique gameID * @param settings * game settings (serialized) */ public GameData(UUID gameID, GameSettings settings) { this(gameID, settings, null); } /** * Creates new game data * * @param gameID * unique gameID * @param settings * game settings (serialized) * @param host * name of the player offering the game */ public GameData(UUID gameID, GameSettings settings, String host) { this.gameID = gameID; this.gameSettings = settings; this.host = host; } /** * Sets the game settings * * @param settings * game settings after adjustment */ public void setGameSettings(GameSettings settings) { gameSettings = settings; } /** * Getter for game settings * * @return returns game settings */ public GameSettings getGameSettings() { return gameSettings; } /** * Getter for host name * * @return host user name */ public String getHost() { return host; } /** * Getter for gameID * * @return gameID */ public UUID getGameID() { return gameID; } }