From 15558d7138efbf16a52d49484a6923b03514f453 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Mon, 30 May 2011 01:31:32 +0200 Subject: Implemented dummy AI git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@318 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/turn/TurnControlTest.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test/jrummikub/control/turn') 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); -- cgit v1.2.3