summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model/IStoneTray.java
blob: 11fcbbbea5e0dc591c3b8c0741fcbddba3cdf67d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package jrummikub.model;

import jrummikub.util.Pair;

public interface IStoneTray<E extends Sizeable> extends
		Iterable<Pair<E, Position>>, Cloneable {

	/**
	 * 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 boolean pickUp(E object);

	public IStoneTray<E> clone();

	public int getSize();

}