diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-31 15:29:37 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-31 15:29:37 +0200 |
commit | c3b4eef14ceee77b66c7231879778df3d29a6e05 (patch) | |
tree | 29ee7e4337873d27577bff4031f6d5ea830d7dd1 /src/jrummikub/model | |
parent | f1abd1b564a64b79c9f6eff25c95df6c6bd142d8 (diff) | |
download | JRummikub-c3b4eef14ceee77b66c7231879778df3d29a6e05.tar JRummikub-c3b4eef14ceee77b66c7231879778df3d29a6e05.zip |
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
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r-- | src/jrummikub/model/StoneSet.java | 9 | ||||
-rw-r--r-- | src/jrummikub/model/Table.java | 6 |
2 files changed, 14 insertions, 1 deletions
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<Stone>, 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<Stone>, 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<Stone>, Sizeable { } else if (stones.size() > settings.getStoneColors().size()) { return new Pair<Type, Integer>( 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<StoneSet> implements ITable { } } + /** + * Constructor for a table + * + * @param settings + * GameSettings + */ public Table(GameSettings settings) { gameSettings = settings; } |