summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-05 23:29:07 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-05 23:29:07 +0200
commit55b19cef1d4594c0e4fe185b446eb59ad5f6bc85 (patch)
tree999ba0366dc32a76a783675d83a481ae13863193
parent511b1139eae65e7eaae24596d76c2835346b3884 (diff)
downloadJRummikub-55b19cef1d4594c0e4fe185b446eb59ad5f6bc85.tar
JRummikub-55b19cef1d4594c0e4fe185b446eb59ad5f6bc85.zip
Add stone dealing to RoundControl and fix some tests... again.
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@160 72836036-5685-4462-b002-a69064685172
-rw-r--r--mock/jrummikub/view/MockTablePanel.java3
-rw-r--r--src/jrummikub/control/RoundControl.java6
-rw-r--r--test/jrummikub/control/RoundControlTest.java2
3 files changed, 7 insertions, 4 deletions
diff --git a/mock/jrummikub/view/MockTablePanel.java b/mock/jrummikub/view/MockTablePanel.java
index 969ece6..c1d839c 100644
--- a/mock/jrummikub/view/MockTablePanel.java
+++ b/mock/jrummikub/view/MockTablePanel.java
@@ -68,8 +68,7 @@ public class MockTablePanel implements ITablePanel {
@Override
public IStoneCollectionPanel getStoneCollectionPanel() {
- // TODO Auto-generated method stub
- return null;
+ return stoneCollectionPanel;
}
@Override
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index 00ebb6e..4949e2b 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -116,7 +116,11 @@ public class RoundControl {
}
private void dealStone() {
- // gameState.getActivePlayer().getHand().drop(object, position)
+ gameState
+ .getActivePlayer()
+ .getHand()
+ .drop(gameState.getGameHeap().drawStone(),
+ new Position(7 + (int) (Math.random() * 6), 0.5f));
}
private void dealPenalty(int count) {
diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java
index f716e27..116786e 100644
--- a/test/jrummikub/control/RoundControlTest.java
+++ b/test/jrummikub/control/RoundControlTest.java
@@ -67,7 +67,7 @@ public class RoundControlTest {
private void checkTableDisplay() {
Iterator<Pair<StoneSet, Position>> stoneSetsView = view.tablePanel.stoneSets
.iterator();
- Iterator<Pair<StoneSet, Position>> stoneSetsModel = testGameState.table.sets
+ Iterator<Pair<StoneSet, Position>> stoneSetsModel = testGameState.table.clone().sets
.iterator();
while (stoneSetsView.hasNext()) {