summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/GameControl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control/GameControl.java')
-rw-r--r--src/jrummikub/control/GameControl.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/jrummikub/control/GameControl.java b/src/jrummikub/control/GameControl.java
index 985781a..194d0de 100644
--- a/src/jrummikub/control/GameControl.java
+++ b/src/jrummikub/control/GameControl.java
@@ -83,10 +83,14 @@ public class GameControl {
}
private void endGame() {
+ removeListeners();
+ endOfGameEvent.emit();
+ }
+
+ private void removeListeners() {
for (Connection c : connections) {
c.remove();
}
- endOfGameEvent.emit();
}
/**
@@ -106,6 +110,16 @@ public class GameControl {
}
}
+ public void abortGame() {
+ removeListeners();
+ if (roundControl != null) {
+ roundControl.abortRound();
+ roundControl = null;
+ }
+
+ view.clearView();
+ }
+
private void startRound() {
if (roundControl != null) {
return;