summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/SaveControl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control/SaveControl.java')
-rw-r--r--src/jrummikub/control/SaveControl.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/jrummikub/control/SaveControl.java b/src/jrummikub/control/SaveControl.java
index 4134aec..1b88d1c 100644
--- a/src/jrummikub/control/SaveControl.java
+++ b/src/jrummikub/control/SaveControl.java
@@ -107,6 +107,13 @@ public class SaveControl {
this.roundState = roundState;
}
+ /**
+ * Loads the specified file and sets game state and round state. If the file
+ * selected cannot be handled, an error will occur and show
+ *
+ * @param file
+ * to be loaded
+ */
private void load(File file) {
try {
ObjectInputStream stream = new ObjectInputStream(
@@ -140,6 +147,13 @@ public class SaveControl {
return loadErrorEvent;
}
+ /**
+ * Saves the current game state and round state to a file with the specified
+ * file name
+ *
+ * @param file
+ * file to save game in
+ */
private void save(File file) {
if (gameState == null || gameSettings == null) {
return;