Package com.svanloon.game.wizard.core.gameOptions

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


  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

  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

   * 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

TOP

Related Classes of com.svanloon.game.wizard.core.gameOptions.GameOptions

Copyright © 2018 www.massapicom. 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.