summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model/IHand.java
blob: c6755c73c55165f618c762df18a25c2010cfa84c (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
43
44
45
46
47
48
49
50
51
package jrummikub.model;

/**
 * Interface for the {@link Hand} model
 */
public interface IHand extends IStoneTray<Stone> {

	/**
	 * The number of used rows
	 * 
	 * @return the number of rows
	 */
	int getRowCount();

	/**
	 * Gets the amount of free space in a hand row
	 * 
	 * @param row
	 *          the row number
	 * @return the number of stones that can fit into the row
	 */
	int getFreeRowSpace(int row);

	/**
	 * Get the accumulated number of points of stones in the hand
	 * 
	 * @param settings
	 *          the game settings
	 * 
	 * @return points
	 */
	int getStonePoints(GameSettings settings);

	/**
	 * Tests whether it is possible to lay down an initial meld using the stones
	 * on the hand
	 * 
	 * @param settings
	 *          the game settings
	 * 
	 * @return true if an initial meld is possible
	 */
	public boolean isInitialMeldPossible(GameSettings settings);

	/**
	 * Counts the pairs of identical stones
	 * 
	 * @return number of identical stone pairs
	 */
	public int getIdenticalStoneCount();
}