summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
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;
+ }
+
}