findSetsWithTotalPoints now finds sets (and total points)

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@341 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Bennet Gerlach 2011-05-31 03:45:21 +02:00
parent eea3cb2188
commit 278edc37a9
2 changed files with 171 additions and 61 deletions

View file

@ -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