diff options
author | Bennet Gerlach <bennet_gerlach@web.de> | 2011-05-31 03:45:21 +0200 |
---|---|---|
committer | Bennet Gerlach <bennet_gerlach@web.de> | 2011-05-31 03:45:21 +0200 |
commit | 278edc37a9861078d5ea1527695ef12766c0fb87 (patch) | |
tree | 035558a6168ffd51f5f00c4e31568538fe1c3b14 /src/jrummikub/model | |
parent | eea3cb2188e26db9680bec29316fc21d14f7118c (diff) | |
download | JRummikub-278edc37a9861078d5ea1527695ef12766c0fb87.tar JRummikub-278edc37a9861078d5ea1527695ef12766c0fb87.zip |
findSetsWithTotalPoints now finds sets (and total points)
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@341 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r-- | src/jrummikub/model/Hand.java | 9 |
1 files changed, 7 insertions, 2 deletions
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<Stone> implements IHand { Pair<TreeMap<Pair<Integer, StoneColor>, Integer>, Integer> stoneCounts = AIUtil .countStones(stones); - return AIUtil.findSetsWithTotalPoints(settings.getInitialMeldThreshold(), - stoneCounts.getFirst(), stoneCounts.getSecond()); + Pair<List<StoneSet>, Integer> result = AIUtil.findSetsWithTotalPoints( + settings.getInitialMeldThreshold(), stoneCounts.getFirst(), + stoneCounts.getSecond()); + + System.out.println(result); + + return (result.getSecond() >= settings.getInitialMeldThreshold()); } @Override |