package jrummikub.control.network; import java.util.UUID; import jrummikub.control.SettingsControl; import jrummikub.model.GameSettings; import jrummikub.view.IGameListPanel.GameData; import jrummikub.view.IView; public class NetworkSettingsControl extends SettingsControl { private GameData gameData = new GameData(UUID.randomUUID(), settings); private ConnectionControl connectionControl; public NetworkSettingsControl(ConnectionControl connectionControl, IView view, GameSettings settings) { super(view, settings); this.connectionControl = connectionControl; } @Override public void startSettings() { super.startSettings(); } @Override protected void update() { super.update(); connectionControl.offerGame(gameData); } @Override public void abort() { super.abort(); connectionControl.withdrawGame(gameData.getGameID()); } }