Search in sources :

Example 1 with Game

use of asteroids.Game in project SimpleAsteroids by ljialin.

the class ParameterSettingsTest method main.

public static void main(String[] args) {
    DefaultParams defParams = new DefaultParams();
    defParams.shipSteer = 1;
    // GameParameters params = new GameParameters().injectValues(evolvableParams);
    GameParameters params = new GameParameters().injectValues(defParams);
    SimpleEvaluator eval = new SimpleEvaluator();
    int nTrials = 30;
    eval.evaluate(defParams, nTrials);
    // exit if we're done
    // comment this out to proceed to visual test
    // System.exit(0);
    int startLevel = 1;
    int nLives = 5;
    boolean visible = true;
    int nTicks = 10000;
    AsteroidsGameState gameState = new AsteroidsGameState().setParams(params).initForwardModel();
    Game game = new Game(gameState, visible);
    ElapsedTimer t = new ElapsedTimer();
    game.run(nTicks);
    System.out.println(t);
// System.out.println(gameState.score);
}
Also used : Game(asteroids.Game) ElapsedTimer(utilities.ElapsedTimer) AsteroidsGameState(asteroids.AsteroidsGameState)

Aggregations

AsteroidsGameState (asteroids.AsteroidsGameState)1 Game (asteroids.Game)1 ElapsedTimer (utilities.ElapsedTimer)1