summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/turn/ITurnControl.java
blob: 5d0cd49f5c5bfb3911470ded2e8fd78a146a4b33 (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
package jrummikub.control.turn;

import jrummikub.model.IPlayer;
import jrummikub.model.ITable;
import jrummikub.util.Event;
import jrummikub.util.IEvent;
import jrummikub.view.IView;

public interface ITurnControl {
	/**
	 * Start the turn
	 * 
	 * @param hand
	 *            active player's hand
	 * @param table
	 *            current table
	 * @param view
	 *            view for user interaction.
	 * @param inspectOnly
	 *            the current turn doesn't allow any table manipulation
	 * @param mayRedeal
	 *            true when the current player may decide to redeal
	 */
	public void setup(IPlayer player, ITable table, IView view,
				boolean inspectOnly, boolean mayRedeal);

	/**
	 * Get the event that is emitted when the turn is over
	 * 
	 * @return end of turn event
	 */
	public abstract IEvent getEndOfTurnEvent();

	/**
	 * Emitted when the round is aborted and needs to be restarted
	 * 
	 * @return the event
	 */
	public abstract Event getRedealEvent();

	/**
	 * Start the turn
	 */
	public abstract void startTurn();

}