diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-16 21:02:58 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-16 21:02:58 +0200 |
commit | 57227570fe6bf9eb5ecf17c32a1db1a7bbed85e3 (patch) | |
tree | 7c053c81f9cf682526e8dcf01fc69a6510015033 | |
parent | f7aace72346b32af6b6aeb7e650d762ec263ff2f (diff) | |
download | JRummikub-57227570fe6bf9eb5ecf17c32a1db1a7bbed85e3.tar JRummikub-57227570fe6bf9eb5ecf17c32a1db1a7bbed85e3.zip |
Fix Cyclomatic Complexity in classify (Qualtitätsmanagement rules!)
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@243 72836036-5685-4462-b002-a69064685172
-rw-r--r-- | src/jrummikub/model/StoneSet.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/jrummikub/model/StoneSet.java b/src/jrummikub/model/StoneSet.java index 2fd8e96..8dece46 100644 --- a/src/jrummikub/model/StoneSet.java +++ b/src/jrummikub/model/StoneSet.java @@ -78,12 +78,7 @@ public class StoneSet implements Iterable<Stone>, Sizeable { if (nonJoker2 == -1) { // Z first if (nonJoker1 == 0 && stones.get(nonJoker1).getValue() < 12) { - int origValue = stones.get(nonJoker1).getValue(); - int value = 0; - for (int i = 0; i < stones.size(); i++) { - value += origValue + i; - } - return new Pair<Type, Integer>(RUN, value); + return new Pair<Type, Integer>(RUN, isValidRun(nonJoker1)); } else { int value = stones.get(nonJoker1).getValue() * stones.size(); return new Pair<Type, Integer>(GROUP, value); |