summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r--src/jrummikub/control/network/NetworkControl.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java
index d56ea0e..ce7714b 100644
--- a/src/jrummikub/control/network/NetworkControl.java
+++ b/src/jrummikub/control/network/NetworkControl.java
@@ -2,6 +2,7 @@ package jrummikub.control.network;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
import jrummikub.util.Connection;
import jrummikub.util.Event;
@@ -19,17 +20,22 @@ public class NetworkControl {
private List<Connection> connections = new ArrayList<Connection>();
private Event stopNetworkEvent = new Event();
- public NetworkControl(LoginData loginData, final IView view) {
+ public NetworkControl(final LoginData loginData, final IView view) {
this.view = view;
connectionControl = new ConnectionControl(loginData);
- connections.add(connectionControl.getConnectedEvent().add(
- new IListener() {
- @Override
- public void handle() {
- view.showGameListPanel(true);
- }
- }));
+ connections.add(connectionControl.getConnectedEvent().add(new IListener() {
+ @Override
+ public void handle() {
+ view.getGameListPanel().setChannelName(loginData.getChannelName());
+ view.showGameListPanel(true);
+
+ GameData testData = new GameData(UUID.randomUUID(), "NeoRaider");
+ testData.setCurrentPlayerCount(2);
+ testData.setMaxPlayerCount(4);
+ view.getGameListPanel().addGame(testData);
+ }
+ }));
connections.add(connectionControl.getConnectionFailedEvent().add(
new IListener() {