summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/SaveControl.java
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-06-21 13:47:15 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-06-21 13:47:15 +0200
commit5e3ce21569f5adc92c969735c88af488cf581916 (patch)
tree08216e061937a4672fffefcf1054caadb92b568e /src/jrummikub/control/SaveControl.java
parentfcd7af76285a58aa8e2ba645b8380c2c86f66908 (diff)
downloadJRummikub-5e3ce21569f5adc92c969735c88af488cf581916.tar
JRummikub-5e3ce21569f5adc92c969735c88af488cf581916.zip
Das reine control-package ist vollständig kommentiert
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@545 72836036-5685-4462-b002-a69064685172
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;