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

import jrummikub.model.IHand;
import jrummikub.model.ITable;
import jrummikub.view.IView;

public abstract class TurnControlFactory {
	/** 
	 * Type of turn control.
	 */
	public enum Type {
		/** */
		HUMAN,
		/** */
		COMPUTER
	};
	
	public abstract ITurnControl create();
	
	static public TurnControlFactory getFactory(Type type) {
		switch(type) {
		case HUMAN:
			return HumanTurnControl.getFactory();
		case COMPUTER:
			return BaseAIControl.getFactory();
		}
		return null;
	}
}