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 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/jrummikub/model/StoneSet.java') 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) -- cgit v1.2.3