From 57227570fe6bf9eb5ecf17c32a1db1a7bbed85e3 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Mon, 16 May 2011 21:02:58 +0200 Subject: =?UTF-8?q?Fix=20Cyclomatic=20Complexity=20in=20classify=20(Qualti?= =?UTF-8?q?t=C3=A4tsmanagement=20rules!)?= 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@243 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/StoneSet.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/jrummikub') 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, 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(RUN, value); + return new Pair(RUN, isValidRun(nonJoker1)); } else { int value = stones.get(nonJoker1).getValue() * stones.size(); return new Pair(GROUP, value); -- cgit v1.2.3