summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-05-01 01:32:19 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-05-01 01:32:19 +0200
commit778a868b9b946bd33819e401d61945920ae0818f (patch)
tree9fe2786b3d9ba3712a5f67dfabc6813ded76506b /src/jrummikub/model
parent22b163ca9c31c750f4701f01c472ee04f8f2ed14 (diff)
downloadJRummikub-778a868b9b946bd33819e401d61945920ae0818f.tar
JRummikub-778a868b9b946bd33819e401d61945920ae0818f.zip
ahm... StoneSet ist jetzt Sizeable...
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@48 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/StoneSet.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/jrummikub/model/StoneSet.java b/src/jrummikub/model/StoneSet.java
index 09eecd5..98d952f 100644
--- a/src/jrummikub/model/StoneSet.java
+++ b/src/jrummikub/model/StoneSet.java
@@ -12,7 +12,8 @@ import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import jrummikub.util.Pair;
/** Class managing {@link Stone}s joined together to form sets */
-public class StoneSet implements Iterable<Stone> {
+public class StoneSet implements Iterable<Stone>, Sizeable {
+ float border = 0.125f;
private List<Stone> stones;
public StoneSet(Stone stone) {
@@ -147,4 +148,14 @@ public class StoneSet implements Iterable<Stone> {
};
}
+ @Override
+ public float getWidth() {
+ return stones.size() + 2 * border;
+ }
+
+ @Override
+ public float getHeight() {
+ return 1;
+ }
+
}