Tabnine Logo
IPirateHunter
Code IndexAdd Tabnine to your IDE (free)

How to use
IPirateHunter
in
ch.sahits.game.openpatrician.model.people

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

origin: ch.sahits.game/OpenPatricianDisplay

@PostConstruct
private void initializeDialog() {
  setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernPirateHunterDialog.title", new Object[]{}, locale.getCurrentLocal()));
  initializeButtons();
  IPirateHunter pirateHunter = (IPirateHunter) currentPerson.get();
  String loadedText = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernPirateHunterDialog.dialog1", new Object[]{pirateHunter.getClientName(), pirateHunter.getPremium()}, locale.getCurrentLocal());
  DecoratedText dt = decoratedTextFactory.createDecoratedText(loadedText, new HashMap<>());
  getContent().addAll(dt);
}
origin: ch.sahits.game/OpenPatricianEngine

} else if (person instanceof IPirateHunter) {
  IPirateHunter hunter = (IPirateHunter) person;
  hunter.setClientName(firstNameLoader.getRandomName()+" "+lastNameLoader.getRandomName());
  hunter.setPirateName(firstNameLoader.getRandomName()+" "+lastNameLoader.getRandomName());
  hunter.setPremium(rnd.nextInt(5000)+1434);
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected EventHandler<MouseEvent> createAcceptHandler() {
  return mouseEvent -> {
    try {
      removeDecoratedContent();
      removeAcceptButton();
      MapSegmentedImage imageMap = segmentFactory.getRandomPirateNest();
      String loadedText = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernPirateHunterDialog.acceptMessage", new Object[]{imageMap.getImageName()}, locale.getCurrentLocal());
      HashMap<String, Object> parameters = new HashMap<>();
      List<Integer> visibleSegs = new ArrayList<>(imageMap.getSegmentIndices());
      parameters.put("visibleSegments", visibleSegs);
      final DecoratedText dt = decoratedTextFactory.createDecoratedText(loadedText, parameters);
      Platform.runLater(() -> getContent().add(dt));
      IPirateHunter pirateHunter = (IPirateHunter) currentPerson.get();
      final IHumanPlayer player = city.getPlayer();
      player.getCompany().updateCash(-pirateHunter.getPremium());
      player.setSegmentedMap(imageMap);
      locationDetector.addSegment(imageMap);
      city.getPlayer().updateCrimialDrive(-1);
      pirateHunter.leave();
      executeOnCloseButtonClicked();
    } catch (RuntimeException e) {
      logger.error("Failed to accept pirate hunter offer", e);
    }
  };
}
ch.sahits.game.openpatrician.model.peopleIPirateHunter

Most used methods

  • getClientName
  • getPremium
  • leave
  • setClientName
  • setPirateName
  • setPremium

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now