From 278edc37a9861078d5ea1527695ef12766c0fb87 Mon Sep 17 00:00:00 2001 From: Bennet Gerlach Date: Tue, 31 May 2011 03:45:21 +0200 Subject: findSetsWithTotalPoints now finds sets (and total points) git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@341 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/Hand.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/jrummikub/model') diff --git a/src/jrummikub/model/Hand.java b/src/jrummikub/model/Hand.java index 0f8b050..344855d 100644 --- a/src/jrummikub/model/Hand.java +++ b/src/jrummikub/model/Hand.java @@ -99,8 +99,13 @@ public class Hand extends StoneTray implements IHand { Pair, Integer>, Integer> stoneCounts = AIUtil .countStones(stones); - return AIUtil.findSetsWithTotalPoints(settings.getInitialMeldThreshold(), - stoneCounts.getFirst(), stoneCounts.getSecond()); + Pair, Integer> result = AIUtil.findSetsWithTotalPoints( + settings.getInitialMeldThreshold(), stoneCounts.getFirst(), + stoneCounts.getSecond()); + + System.out.println(result); + + return (result.getSecond() >= settings.getInitialMeldThreshold()); } @Override -- cgit v1.2.3