Codota Logo
GuildSettings
Code IndexAdd Codota to your IDE (free)

How to use
GuildSettings
in
ch.sahits.game.openpatrician.model.city.guild

Best Java code snippets using ch.sahits.game.openpatrician.model.city.guild.GuildSettings (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: ch.sahits.game/OpenPatricianClientServerInterface

/**
 * Calculate the entry fee for the guild based on the company value.
 * @param player for whom to calculate the entry fee
 * @return entry fee for the player.
 */
public int getEntryFee(IPlayer player) {
  long companyValue = player.getCompany().getCompanyValue();
  int min = guildSettings.getMinEntryFee();
  int max = guildSettings.getMaxEntryFee();
  int span = max - min;
  if  (companyValue <= MIN_COMPANY_VALUE) {
    return min;
  }
  if (companyValue >= MAX_COMPANY_VALUE) {
    return max;
  }
  double factor = companyValue * 1.0 / MAX_COMPANY_VALUE;
  double fee = min + span * factor;
  return (int)Math.rint(fee);
}
origin: ch.sahits.game/OpenPatricianDisplay

  @PostConstruct
  private void initializeDialog() {
    setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildMediterraneanMapDialog.title",
        new Object[]{}, locale.getCurrentLocal()));
    IMediterreanMap map = guildSettings.getMediterreanMap();
    Image image = imageUtilities.createMediterraneanMap(city.getPlayer(), map);
    ImageView imgView = new ImageView(image);
    imgView.setId("mediterraneanMap");
    imgView.setFitWidth(WRAPPING_WIDTH);
    imgView.setPreserveRatio(true);
    VBox box = new VBox(imgView);
    box.setLayoutX(2 * FRAME_BORDER);
    box.setLayoutY(CLOSE_BTN_Y_POS - 500);
    getContent().add(box);
  }
}
origin: ch.sahits.game/OpenPatricianDisplay

  @PostConstruct
  private void initializeDialog() {
    setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildTradeAgreementDialog.title",
        new Object[]{}, locale.getCurrentLocal()));
    IMediterreanMap map = guildSettings.getMediterreanMap();
    List<ITradeAgreement> agreements = map.getTradeAgreements(city.getPlayer());
    VBox box = new VBox(10);

    for (ITradeAgreement agreement : agreements) {
      String cityName = agreement.getTradeLocation().getName();
      String ware = modelTranslations.getLocalDisplayName((EWare) agreement.getWare());
      int price = agreement.getWareAndAmount().getAVGPrice();
      int amount = agreement.getWareAndAmount().getAmount();
      String till = modelTranslations.toDisplayString(agreement.getValidTill());
      String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildTradeAgreementDialog.agreement",
          new Object[]{cityName, amount, ware, price, till}, locale.getCurrentLocal());
      DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
      box.getChildren().add(text);
    }
    box.setLayoutX(2 * FRAME_BORDER);
    box.setLayoutY(CLOSE_BTN_Y_POS - 500);
    getContent().add(box);
  }
}
ch.sahits.game.openpatrician.model.city.guildGuildSettings

Most used methods

  • getMaxEntryFee
  • getMediterreanMap
  • getMinEntryFee

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now