From f22ff5f0f1d8f9838c30943bde658ca3f282bbc8 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Tue, 31 May 2011 00:58:46 +0200 Subject: =?UTF-8?q?Tests=20f=C3=BCr=20Sets=20mit=20mehr=20Farben,=20mehr?= =?UTF-8?q?=20Values,=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@332 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/RoundControl.java | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/jrummikub/control') diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java index 5874532..e04327f 100644 --- a/src/jrummikub/control/RoundControl.java +++ b/src/jrummikub/control/RoundControl.java @@ -78,22 +78,23 @@ public class RoundControl { } private void prepareTurn() { - boolean isHuman = roundState.getActivePlayer().getPlayerSettings().getTurnControlType() == HUMAN; + boolean isHuman = roundState.getActivePlayer().getPlayerSettings() + .getTurnControlType() == HUMAN; clonedTable = (ITable) roundState.getTable().clone(); - + if (isHuman) { view.enableStartTurnPanel(true); } else { view.enableThinkPanel(true); } - + view.getTablePanel().setStoneSets(clonedTable); view.setCurrentPlayerName(roundState.getActivePlayer() .getPlayerSettings().getName()); view.setCurrentPlayerColor(roundState.getActivePlayer() .getPlayerSettings().getColor()); view.setHasLaidOut(roundState.getActivePlayer().getLaidOut()); - + if (!isHuman) startTurn(); } @@ -101,7 +102,8 @@ public class RoundControl { private void startTurn() { if (turnControl != null) return; - boolean isHuman = roundState.getActivePlayer().getPlayerSettings().getTurnControlType() == HUMAN; + boolean isHuman = roundState.getActivePlayer().getPlayerSettings() + .getTurnControlType() == HUMAN; boolean inspectOnly = roundState.getTurnNumber() < 1; boolean mayRedeal = inspectOnly && roundState.getActivePlayer().getHand() @@ -110,10 +112,11 @@ public class RoundControl { if (isHuman) { view.getPlayerPanel().setEndTurnMode(inspectOnly, mayRedeal); } - turnControl = TurnControlFactory.getFactory(roundState.getActivePlayer() - .getPlayerSettings().getTurnControlType()).create(); - turnControl.setup(roundState.getActivePlayer(), clonedTable, - view, inspectOnly, mayRedeal); + turnControl = TurnControlFactory.getFactory( + roundState.getActivePlayer().getPlayerSettings() + .getTurnControlType()).create(); + turnControl.setup(roundState.getActivePlayer(), clonedTable, view, + inspectOnly, mayRedeal); turnControl.getEndOfTurnEvent().add(new IListener() { @Override public void handle() { @@ -148,7 +151,8 @@ public class RoundControl { int totalValue = 0; for (StoneSet set : newSets) { - totalValue += set.classify().getSecond(); + totalValue += set.classify(roundState.getGameSettings()) + .getSecond(); } return totalValue == 0 -- cgit v1.2.3