From 65d08ea450ac96ce35d1512707850524d805c790 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Sun, 29 May 2011 20:22:47 +0200 Subject: Created dummy base AI control git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@311 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/turn/HumanTurnControl.java | 41 +++++------------------- 1 file changed, 8 insertions(+), 33 deletions(-) (limited to 'src/jrummikub/control/turn/HumanTurnControl.java') diff --git a/src/jrummikub/control/turn/HumanTurnControl.java b/src/jrummikub/control/turn/HumanTurnControl.java index 399f547..6dc055a 100644 --- a/src/jrummikub/control/turn/HumanTurnControl.java +++ b/src/jrummikub/control/turn/HumanTurnControl.java @@ -26,37 +26,16 @@ import jrummikub.view.IView; * Controller for a single turn made by a human player */ public class HumanTurnControl extends AbstractTurnControl { - private IHand hand; - private ITable table; private ITurnTimer timer; - private IView view; private List selectedStones = new ArrayList(); private List connections = new ArrayList(); - private boolean inspectOnly; - /** - * Create a new TurnControl using a given hand (of the active player), a - * given table and a given view for user interaction. - * - * @param hand - * active player's hand - * @param table - * current table - * @param view - * view for user interaction. - * @param inspectOnly - * the current turn doesn't allow any table manipulation + * Create a new human player's turn control */ - public HumanTurnControl(IHand hand, ITable table, IView view, - boolean inspectOnly) { - this.hand = hand; - this.table = table; - this.view = view; - this.inspectOnly = inspectOnly; - this.timer = new TurnTimer(view); + public HumanTurnControl() { } /** @@ -67,25 +46,22 @@ public class HumanTurnControl extends AbstractTurnControl { public static TurnControlFactory getFactory() { return new TurnControlFactory() { @Override - public ITurnControl create(IHand hand, ITable table, IView view, - boolean inspectOnly) { - return new HumanTurnControl(hand, table, view, inspectOnly); + public ITurnControl create() { + return new HumanTurnControl(); } }; } /** Test only constructor **/ - HumanTurnControl(IHand hand, ITable table, IView view, ITurnTimer testTimer) { - this.hand = hand; - this.table = table; - this.view = view; + HumanTurnControl(ITurnTimer testTimer) { this.timer = testTimer; - this.inspectOnly = false; } @Override public void startTurn() { - + if (this.timer == null) { + this.timer = new TurnTimer(view); + } IListener endOfTurnListener = new IListener() { @Override @@ -565,5 +541,4 @@ public class HumanTurnControl extends AbstractTurnControl { } } } - } -- cgit v1.2.3