This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
JRummikub/src/jrummikub/model/IStoneTray.java
Jannis Harder ce982fcdaf Tests for dropping on hand
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@206 72836036-5685-4462-b002-a69064685172
2011-05-10 01:39:32 +02:00

42 lines
No EOL
973 B
Java

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();
}