diff options
author | Bennet Gerlach <bennet_gerlach@web.de> | 2011-05-04 16:23:10 +0200 |
---|---|---|
committer | Bennet Gerlach <bennet_gerlach@web.de> | 2011-05-04 16:23:10 +0200 |
commit | c9843770ddee02dca46c6ba5d81cc84da32d06d4 (patch) | |
tree | 47237d564683a5b5027d8be521047819dec81f27 /src/jrummikub/model/IStoneTray.java | |
parent | b5bbfc25de34e0e21237d3f6f0e72e9f2fa929ab (diff) | |
download | JRummikub-c9843770ddee02dca46c6ba5d81cc84da32d06d4.tar JRummikub-c9843770ddee02dca46c6ba5d81cc84da32d06d4.zip |
Added interfaces for model classes
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@104 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model/IStoneTray.java')
-rw-r--r-- | src/jrummikub/model/IStoneTray.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/jrummikub/model/IStoneTray.java b/src/jrummikub/model/IStoneTray.java new file mode 100644 index 0000000..a9afed3 --- /dev/null +++ b/src/jrummikub/model/IStoneTray.java @@ -0,0 +1,40 @@ +package jrummikub.model;
+
+import jrummikub.util.Pair;
+
+public interface IStoneTray<E extends Sizeable> extends
+ Iterable<Pair<E, Position>> {
+
+ /**
+ * Removes object from tray and returns it
+ *
+ * @param position
+ * position of the object that will be removed
+ * @return the picked up stone
+ */
+ public E pickUp(Position position);
+
+ /**
+ * Adds object to the tray
+ *
+ * @param object
+ * object to add to Hand
+ * @param position
+ * {@link Position} to put the object
+ */
+ public void drop(E object, Position position);
+
+ /**
+ * Returns the position of an object that is already on the tray
+ *
+ * @param object
+ * object whose position is requested
+ * @return position of the object or null when the object is not on the tray
+ */
+ public Position getPosition(E object);
+
+ public void pickUp(E object);
+
+ public IStoneTray<E> clone();
+
+}
\ No newline at end of file |