From c3b4eef14ceee77b66c7231879778df3d29a6e05 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Tue, 31 May 2011 15:29:37 +0200 Subject: Fixed all warnings (comments) but one, one TODO important git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@351 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/StoneSet.java | 9 ++++++++- src/jrummikub/model/Table.java | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/jrummikub/model') diff --git a/src/jrummikub/model/StoneSet.java b/src/jrummikub/model/StoneSet.java index 3324565..39fb158 100644 --- a/src/jrummikub/model/StoneSet.java +++ b/src/jrummikub/model/StoneSet.java @@ -49,6 +49,9 @@ public class StoneSet implements Iterable, Sizeable { /** * Test for rule conflict within the StoneSet * + * @param settings + * GameSettings + * * @return true when the set is valid according to the rules */ public boolean isValid(GameSettings settings) { @@ -59,6 +62,9 @@ public class StoneSet implements Iterable, Sizeable { * Test for rule conflict within the StoneSet and determine whether the set * is a group or a run * + * @param settings + * GameSettings + * * @return GROUP or RUN for valid sets, INVALID otherwise */ @@ -80,7 +86,8 @@ public class StoneSet implements Iterable, Sizeable { } else if (stones.size() > settings.getStoneColors().size()) { return new Pair( RUN, - (settings.getHighestValue() * (settings.getHighestValue() + 1)) + (settings.getHighestValue() * (settings + .getHighestValue() + 1)) / 2 - (stones.size() - settings.getHighestValue()) * (stones.size() - settings.getHighestValue() - 1) diff --git a/src/jrummikub/model/Table.java b/src/jrummikub/model/Table.java index 87c360c..1ac31a9 100644 --- a/src/jrummikub/model/Table.java +++ b/src/jrummikub/model/Table.java @@ -19,6 +19,12 @@ public class Table extends StoneTray implements ITable { } } + /** + * Constructor for a table + * + * @param settings + * GameSettings + */ public Table(GameSettings settings) { gameSettings = settings; } -- cgit v1.2.3