Fixed drawing single cards before the initial meld

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@269 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-05-24 22:33:08 +02:00
parent 21f866d2ea
commit 79bffeba5d

View file

@ -109,7 +109,7 @@ public class RoundControl {
}
}
private boolean laidOutEnough() {
private boolean laidOutValidPoints() {
List<StoneSet> newSets = tableSetDifference(roundState.getTable(),
clonedTable);
@ -118,8 +118,9 @@ public class RoundControl {
totalValue += set.classify().getSecond();
}
return totalValue >= roundState.getGameSettings()
.getInitialMeldThreshold();
return totalValue == 0
|| totalValue >= roundState.getGameSettings()
.getInitialMeldThreshold();
}
private void endOfTurn() {
@ -151,11 +152,12 @@ public class RoundControl {
}
if (!roundState.getActivePlayer().getLaidOut()) {
// Player touched forbidden stones
if (!tableSetDifference(clonedTable, roundState.getTable()).isEmpty()) {
if (!tableSetDifference(clonedTable, roundState.getTable())
.isEmpty()) {
rejectMove();
return;
}
if (!laidOutEnough()) {
if (!laidOutValidPoints()) {
rejectMove();
return;
}