Package edu.wisc.game.sql
Class RandomGameGenerator
java.lang.Object
edu.wisc.game.sql.GameGenerator
edu.wisc.game.sql.RandomGameGenerator
public class RandomGameGenerator extends GameGenerator
This class generates random games (with the same rule set and
randomly created initial boards) based on the provided parameter
range specifications
-
Constructor Summary
Constructors Constructor Description RandomGameGenerator(RandomRG _random, File ruleSetFile, int[] _nPiecesRange, int[] _nShapesRange, int[] _nColorsRange, Piece.Shape[] _allShapes, Piece.Color[] _allColors)
-
Method Summary
Modifier and Type Method Description static RandomGameGenerator
buildFromArgv(RandomRG _random, File f, ParseConfig ht, String[] argv, int ja)
Builds a RandomGameGenerator from command-line argumentsstatic void
main(String[] argv)
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.Game
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, 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 RandomGameGenerator buildFromArgv(RandomRG _random, File f, ParseConfig ht, String[] argv, int ja) throws IOException, RuleParseExceptionBuilds a RandomGameGenerator from command-line arguments- Throws:
IOException
RuleParseException
-
main
public static void main(String[] argv) throws IOException, RuleParseException, ReflectiveOperationException, IllegalInputExceptionCreates 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.
-