Package edu.wisc.game.sql
Class RandomGameGenerator
java.lang.Object
edu.wisc.game.sql.GameGenerator
edu.wisc.game.sql.RandomGameGenerator
This class generates random games (with the same rule set and
randomly created initial boards) based on the provided parameter
range specifications
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wisc.game.sql.GameGenerator
GameGenerator.Features
-
Constructor Summary
ConstructorsConstructorDescriptionRandomGameGenerator
(RandomRG _random, File ruleSetFile, int[] _nPiecesRange, int[] _nShapesRange, int[] _nColorsRange, Piece.Shape[] _allShapes, Piece.Color[] _allColors) -
Method Summary
Modifier and TypeMethodDescriptionstatic GameGenerator
buildFromArgv
(RandomRG _random, File f, ParseConfig ht, String[] argv, int ja) Builds a RandomGameGenerator from command-line arguments.static void
Creates a bunch of random boards, from which one can later select those matching some additional criteria, and use them in an experiment plan with predefined boards.nextGame()
Generates a game with a random initial board, in accordance with this generator's parametersMethods inherited from class edu.wisc.game.sql.GameGenerator
advance, getAllFeatures, getRules, getTesting, mkGameGenerator, setConditions, setTesting
-
Constructor Details
-
RandomGameGenerator
public RandomGameGenerator(RandomRG _random, File ruleSetFile, int[] _nPiecesRange, int[] _nShapesRange, int[] _nColorsRange, Piece.Shape[] _allShapes, Piece.Color[] _allColors) throws IOException, RuleParseException - Throws:
IOException
RuleParseException
-
-
Method Details
-
nextGame
Generates a game with a random initial board, in accordance with this generator's parameters- Specified by:
nextGame
in classGameGenerator
-
buildFromArgv
public static GameGenerator buildFromArgv(RandomRG _random, File f, ParseConfig ht, String[] argv, int ja) throws IOException, RuleParseException, IllegalInputException, ReflectiveOperationException Builds a RandomGameGenerator from command-line arguments. Used in Captive Game Server- Parameters:
f
- If specified, this is the rule set file to use. It can be null, if you just need the generator to create boards, and not to play a game.ja
- Use argv[ja:...]- Throws:
IOException
RuleParseException
IllegalInputException
ReflectiveOperationException
-
main
public static void main(String[] argv) throws IOException, RuleParseException, ReflectiveOperationException, IllegalInputException Creates a bunch of random boards, from which one can later select those matching some additional criteria, and use them in an experiment plan with predefined boards.
-