From 5e3ce21569f5adc92c969735c88af488cf581916 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Tue, 21 Jun 2011 13:47:15 +0200 Subject: =?UTF-8?q?Das=20reine=20control-package=20ist=20vollst=C3=A4ndig?= =?UTF-8?q?=20kommentiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@545 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/SaveControl.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/jrummikub/control/SaveControl.java') 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; -- cgit v1.2.3