From 778a868b9b946bd33819e401d61945920ae0818f Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Sun, 1 May 2011 01:32:19 +0200 Subject: ahm... StoneSet ist jetzt Sizeable... git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@48 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/StoneSet.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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 { +public class StoneSet implements Iterable, Sizeable { + float border = 0.125f; private List stones; public StoneSet(Stone stone) { @@ -147,4 +148,14 @@ public class StoneSet implements Iterable { }; } + @Override + public float getWidth() { + return stones.size() + 2 * border; + } + + @Override + public float getHeight() { + return 1; + } + } -- cgit v1.2.3