summaryrefslogtreecommitdiffstats
path: root/test/jrummikub/control/turn
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-30 01:31:32 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-30 01:31:32 +0200
commit15558d7138efbf16a52d49484a6923b03514f453 (patch)
treebdbb4df7864370b5ebcdb2a6a9750799b1a2ada4 /test/jrummikub/control/turn
parentf3f52956f711658f42ef753b7ff46728da67aa54 (diff)
downloadJRummikub-15558d7138efbf16a52d49484a6923b03514f453.tar
JRummikub-15558d7138efbf16a52d49484a6923b03514f453.zip
Implemented dummy AI
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@318 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub/control/turn')
-rw-r--r--test/jrummikub/control/turn/TurnControlTest.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/jrummikub/control/turn/TurnControlTest.java b/test/jrummikub/control/turn/TurnControlTest.java
index 9140323..11c4c2b 100644
--- a/test/jrummikub/control/turn/TurnControlTest.java
+++ b/test/jrummikub/control/turn/TurnControlTest.java
@@ -21,6 +21,7 @@ import jrummikub.control.turn.HumanTurnControl;
import jrummikub.model.IHand;
import jrummikub.model.ITable;
import jrummikub.model.MockHand;
+import jrummikub.model.MockPlayer;
import jrummikub.model.MockTable;
import jrummikub.model.Position;
import jrummikub.model.Stone;
@@ -68,6 +69,7 @@ public class TurnControlTest {
}
HumanTurnControl testControl;
+ MockPlayer mockPlayer;
MockView mockView;
MockTimer mockTimer;
MockTable mockTable;
@@ -105,8 +107,10 @@ public class TurnControlTest {
mockTimer = new MockTimer();
mockTable = new MockTable();
mockHand = new MockHand();
+ mockPlayer = new MockPlayer(null, null);
+ mockPlayer.hand = mockHand;
testControl = new HumanTurnControl(mockTimer);
- testControl.setup(mockHand, mockTable, mockView, false, false);
+ testControl.setup(mockPlayer, mockTable, mockView, false, false);
}
/** */
@@ -131,7 +135,7 @@ public class TurnControlTest {
mockHand.iterable = stones;
testControl = new HumanTurnControl(mockTimer);
- testControl.setup(mockHand, mockTable, mockView, false, false);
+ testControl.setup(mockPlayer, mockTable, mockView, false, false);
testControl.startTurn();
int i = 0;
@@ -627,7 +631,7 @@ public class TurnControlTest {
public void testAddLeft() {
AccessibleTable table = new AccessibleTable();
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
- turnControl.setup(mockHand, table, mockView, false, false);
+ turnControl.setup(mockPlayer, table, mockView, false, false);
turnControl.startTurn();
Stone blueOne = new Stone(1, BLUE);
Stone redOne = new Stone(1, RED);
@@ -744,7 +748,7 @@ public class TurnControlTest {
public void testAddRight() {
AccessibleTable table = new AccessibleTable();
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
- turnControl.setup(mockHand, table, mockView, false, false);
+ turnControl.setup(mockPlayer, table, mockView, false, false);
turnControl.startTurn();
Stone blueOne = new Stone(1, BLUE);
Stone redOne = new Stone(1, RED);
@@ -861,7 +865,7 @@ public class TurnControlTest {
public void testAddNewSet() {
AccessibleTable table = new AccessibleTable();
HumanTurnControl turnControl = new HumanTurnControl(mockTimer);
- turnControl.setup(mockHand, table, mockView, false, false);
+ turnControl.setup(mockPlayer, table, mockView, false, false);
turnControl.startTurn();
Stone blueOne = new Stone(1, BLUE);
Stone redOne = new Stone(1, RED);