diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-29 20:22:47 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-29 20:22:47 +0200 |
commit | 65d08ea450ac96ce35d1512707850524d805c790 (patch) | |
tree | e5f58871eaca2df9fb05e79bf5b2982e626488af /src/jrummikub/control/turn/HumanTurnControl.java | |
parent | f6a3409ed525db8c416f46ac57f3861866443c22 (diff) | |
download | JRummikub-65d08ea450ac96ce35d1512707850524d805c790.tar JRummikub-65d08ea450ac96ce35d1512707850524d805c790.zip |
Created dummy base AI control
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@311 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/turn/HumanTurnControl.java')
-rw-r--r-- | src/jrummikub/control/turn/HumanTurnControl.java | 41 |
1 files changed, 8 insertions, 33 deletions
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<Stone> selectedStones = new ArrayList<Stone>(); private List<Connection> connections = new ArrayList<Connection>(); - 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 { } } } - } |