diff options
Diffstat (limited to 'src/jrummikub/model/StoneSet.java')
-rw-r--r-- | src/jrummikub/model/StoneSet.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jrummikub/model/StoneSet.java b/src/jrummikub/model/StoneSet.java index 0d53b52..1bb0823 100644 --- a/src/jrummikub/model/StoneSet.java +++ b/src/jrummikub/model/StoneSet.java @@ -1,5 +1,6 @@ package jrummikub.model; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -11,10 +12,12 @@ import jrummikub.util.Pair; import static jrummikub.model.StoneSet.Type.*; /** Class managing {@link Stone}s joined together to form sets */ -public class StoneSet implements Iterable<Stone>, Sizeable { +public class StoneSet implements Iterable<Stone>, Sizeable, Serializable { + private static final long serialVersionUID = -3852631195648599398L; + static final float VERTICAL_BORDER = 0.5f; static final float HORIZONTAL_BORDER = 0.125f; - private List<Stone> stones; + private ArrayList<Stone> stones; /** * Create a new single stone stone set @@ -23,7 +26,7 @@ public class StoneSet implements Iterable<Stone>, Sizeable { * single stone of the set */ public StoneSet(Stone stone) { - stones = Collections.singletonList(stone); + stones = new ArrayList<Stone>(Collections.singletonList(stone)); } /** |