ahm... StoneSet ist jetzt Sizeable...
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@48 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
22b163ca9c
commit
778a868b9b
1 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue