summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/RoundControl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control/RoundControl.java')
-rw-r--r--src/jrummikub/control/RoundControl.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index f060420..fb4ab0c 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -228,10 +228,12 @@ public class RoundControl {
} else {
List<Stone> markedStones = new ArrayList<Stone>();
for (Pair<StoneSet, Position> set : clonedTable) {
- if (!set.getFirst().isValid(roundState.getGameSettings())) {
- for (Stone stone : set.getFirst()) {
- markedStones.add(stone);
- }
+ if (set.getFirst().isValid(roundState.getGameSettings())) {
+ continue;
+ }
+ for (Stone stone : set.getFirst()) {
+ markedStones.add(stone);
+
}
}
view.setStoneCollectionHidden(true);
@@ -401,8 +403,8 @@ public class RoundControl {
.getGameSettings());
}
- bestScore = updateBestScore(bestScore, -stonePoints,
- playerHand.getSize());
+ bestScore = updateBestScore(bestScore, -stonePoints, playerHand
+ .getSize());
points.add(-stonePoints);
pointSum += stonePoints;
@@ -424,8 +426,8 @@ public class RoundControl {
private static Pair<Integer, Integer> updateBestScore(
Pair<Integer, Integer> bestScore, int stonePoints, int size) {
if (bestScore.getFirst() == stonePoints) {
- return new Pair<Integer, Integer>(stonePoints, Math.min(
- bestScore.getSecond(), size));
+ return new Pair<Integer, Integer>(stonePoints, Math.min(bestScore
+ .getSecond(), size));
} else if (bestScore.getFirst() < stonePoints) {
return new Pair<Integer, Integer>(stonePoints, size);
}