Examples of GameOptions


Examples of com.barrybecker4.game.common.GameOptions

        LocaleType[] locales = LocaleType.values();
        GameContext.setLocale(locales[localeComboBox_.getSelectedIndex()]);

        // game specific options
        GameOptions options = getOptions();
        String msgs = options.testValidity();
        if (msgs == null) {
            controller_.setOptions(options);
            this.setVisible( false );
        }
        else {
View Full Code Here

Examples of com.svanloon.game.wizard.core.gameOptions.GameOptions

  public GameOptions load() {
    try {
      loadProperties();
    } catch (IOException e) {
      _logger.info("Game Options are not set up, using defaults instead");
      return new GameOptions();
    }

    GameOptions go = new GameOptions();
    go.setBidType(BidType.valueOf(getProperty(BID_TYPE, go.getBidType().toString())));
    go.setGameSpeed(GameSpeed.valueOf(getProperty(GAME_SPEED, go.getGameSpeed().toString())));
    return go;
  }
View Full Code Here

Examples of com.svanloon.game.wizard.core.gameOptions.GameOptions

  private void play() {
    SplashScreen splashScreen = new SplashScreen();
    splashScreen.prompt();
    UserPreferences up = splashScreen.getUserPreferences();
    GameOptions go = splashScreen.getGameOptions();
    GameType gameType = splashScreen.getGameType();
    Locale locale = up.getLocale();

    LanguageFactory.setLocale(locale);

    // prompt to start game, host game, or connect to host
    if(gameType.equals(GameType.HOSTED)) {
      int numberOfPlayers = go.getTotalNumberOfPlayers();
      HumanPlayerSwing hps = new HumanPlayerSwing(numberOfPlayers, up);
      hps.setVisible(true);
      hps.setUserPreferences(up);
      Server server = new Server(hps, go, numberOfPlayers);
      server.setNumberOfPlayers(go.getTotalHumanPlayers());
      List<String> names = createListOfRandomNames();
      int counter = 0;
      for(String name : names) {
        server.addBot(new ComputerPlayer(name));
        counter++;
View Full Code Here

Examples of com.svanloon.game.wizard.core.gameOptions.GameOptions

  public BotTester() {
    super();
  }

  private void play() {
    GameOptions go = new GameOptions();
    go.setTotalNumberOfPlayers(4);
    go.setTotalHumanPlayers(-1);
    int numberOfPlayers = go.getTotalNumberOfPlayers();
   
    int numberOfGames = 1000;
    for(int i = 0; i < numberOfGames; i++) {
      Server server = new Server(null, go, numberOfPlayers);
      server.setNumberOfPlayers(go.getTotalHumanPlayers());
      server.addBot(new ComputerPlayer("Computer 1"));
      server.addBot(new ComputerPlayer("Computer 2"));
      server.addBot(new ComputerPlayer("Computer 3"));
      server.addBot(new ComputerPlayer("Computer 4"));
      server.addBot(new ComputerPlayer("Computer 5"));
View Full Code Here

Examples of com.svanloon.game.wizard.core.gameOptions.GameOptions

   * Document the main method
   *
   * @param args
   */
  public static void main(String[] args) {
    WizardEngine wizardEngine = new WizardEngine(new GameOptions());
    Thread t = new Thread(wizardEngine);
    t.start();
  }
View Full Code Here

Examples of jimmm.data.GameOptions

    JFrame.setDefaultLookAndFeelDecorated(true);
    mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//    mainFrame.setLayout(new BoxLayout(mainFrame, BoxLayout.Y_AXIS));
    mainFrame.setLayout(new GridLayout(4, 1));
   
    GameOptions go = new GameOptions();
      go.initialCardsPerPlayer = 5;
    GameState gs = new GameState( new ArrayList<Player>(Arrays.asList(p1,p2)), go);
   
    TooSimpleHandRenderer h1 = new TooSimpleHandRenderer(p1, gs);
    TooSimpleHandRenderer h2 = new TooSimpleHandRenderer(p2,gs);
View Full Code Here

Examples of mage.game.GameOptions

        game.loadCards(deck2.getCards(), computerB.getId());

        boolean testMode = true;

        long t1 = System.nanoTime();
        GameOptions options = new GameOptions();
        options.testMode = true;
        game.start(computerA.getId(), options);
        long t2 = System.nanoTime();

        logger.info("Winner: " + game.getWinner());
View Full Code Here

Examples of mage.game.GameOptions

        //boolean testMode = false;
        boolean testMode = true;

        long t1 = System.nanoTime();
        GameOptions options = new GameOptions();
        options.testMode = true;
        game.start(computerA.getId(), options);
        long t2 = System.nanoTime();

        logger.info("Winner: " + game.getWinner());
View Full Code Here

Examples of mage.game.GameOptions

            getHandCards(testPlayer).clear();
            getBattlefieldCards(testPlayer).clear();
            getGraveCards(testPlayer).clear();
        }

        gameOptions = new GameOptions();
    }
View Full Code Here

Examples of megamek.common.options.GameOptions

    /**
     * Display the game options dialog.
     */
    private void showGameOptions() {
        GameOptions options = new GameOptions();
        options.initialize();
        options.loadOptions();
        if (optdlg == null) {
            optdlg = new GameOptionsDialog(frame, options);
        }
        optdlg.update(options);
        optdlg.setVisible(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.