Add winning notification and fix test...
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@161 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
55b19cef1d
commit
193e9247fa
2 changed files with 13 additions and 1 deletions
|
@ -81,7 +81,12 @@ public class RoundControl {
|
|||
if (clonedTable.isValid()) {
|
||||
gameState.setTable(clonedTable);
|
||||
|
||||
// TODO Win check
|
||||
System.err.println(gameState.getActivePlayer().getName());
|
||||
System.err.println(gameState.getActivePlayer().getHand().getSize());
|
||||
if (gameState.getActivePlayer().getHand().getSize() == 0) {
|
||||
win();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
gameState.getGameHeap().putBack(tableDiff);
|
||||
dealPenalty(tableDiff.size());
|
||||
|
@ -127,4 +132,8 @@ public class RoundControl {
|
|||
for (int i = 0; i < count + 3; ++i)
|
||||
dealStone();
|
||||
}
|
||||
|
||||
private void win() {
|
||||
view.enableWinPanel(true);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue