Package edu.wisc.game.engine
Class Captive
- java.lang.Object
-
- edu.wisc.game.engine.Captive
-
public class Captive extends Object
The main class for the Captive Game Server
-
-
Constructor Summary
Constructors Constructor Description Captive()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
asComment(String s)
Produces a single-line or multi-line comment to be used in stdoutstatic GameGenerator
buildGameGenerator(ParseConfig ht, String[] argv)
Creates a GameGenerator based on the parameters found in the command linestatic void
main(String[] argv)
A complete CGS session.static MlcLog
mkLog(ParseConfig ht)
Creates an MLC results logger object, if required by the command line params.
-
-
-
Method Detail
-
asComment
public static String asComment(String s)
Produces a single-line or multi-line comment to be used in stdout
-
buildGameGenerator
public static GameGenerator buildGameGenerator(ParseConfig ht, String[] argv) throws IOException, RuleParseException, ReflectiveOperationException, IllegalInputException
Creates a GameGenerator based on the parameters found in the command line- Parameters:
argv
- The argv array (from the command line or the GAME command in the pipe or socket stream), from which any superfluous quotes must have already been stripped.simpleRuleSetName
- An output parameter, into which the simplified rule set name (no dir name and no extension) will be put.- Throws:
IOException
RuleParseException
ReflectiveOperationException
IllegalInputException
-
mkLog
public static MlcLog mkLog(ParseConfig ht)
Creates an MLC results logger object, if required by the command line params.- Returns:
- an MLC results logger object, or null if one is not requested
-
main
public static void main(String[] argv) throws IOException, RuleParseException, ReflectiveOperationException, IllegalInputException
A complete CGS session. Creates a game generator, creates a game, plays one or several episodes, and exits.
-
-