summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-06-19 23:42:19 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-06-19 23:42:19 +0200
commitec54bde90aad27a5ec4bc7bfec6cef732c7c3348 (patch)
treeb50a670b1d1b8dd98954099130f05455e3f3da95 /src/jrummikub/control
parent9df549727672e8df768d46e3ef1fb0c7957f0f89 (diff)
downloadJRummikub-ec54bde90aad27a5ec4bc7bfec6cef732c7c3348.tar
JRummikub-ec54bde90aad27a5ec4bc7bfec6cef732c7c3348.zip
Show heap size in side panel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@497 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r--src/jrummikub/control/RoundControl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index f209f3e..285980a 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -203,12 +203,15 @@ public class RoundControl {
}
void deal() {
+ view.getSidePanel().setHeapCapacity(roundState.getGameHeap().getSize());
for (int i = 0; i < roundState.getPlayerCount(); i++) {
IHand hand = roundState.getNthNextPlayer(i).getHand();
for (int j = 0; j < roundState.getGameSettings().getNumberOfStonesDealt(); j++) {
hand.drop(roundState.getGameHeap().drawStone(), new Position(0, 0));
}
}
+ view.getSidePanel().setHeapSize(roundState.getGameHeap().getSize());
+
}
private boolean laidOutValidPoints() {
@@ -392,6 +395,8 @@ public class RoundControl {
hand.drop(roundState.getGameHeap().drawStone(), new Position(
Hand.WIDTH - 1, rowCount - 1));
}
+
+ view.getSidePanel().setHeapSize(roundState.getGameHeap().getSize());
}
private void dealStone() {