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/control/turn/TurnControlFactory.java
Ida Massow 7404566d46 Fixed a few warnings
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@320 72836036-5685-4462-b002-a69064685172
2011-05-30 10:13:26 +02:00

30 lines
530 B
Java

package jrummikub.control.turn;
/**
* Creates a turn control for the active player, regarding if layer is human or
* computer
*
*/
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;
}
}