congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IPirateHunter.leave
Code IndexAdd Tabnine to your IDE (free)

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

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

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.peopleIPirateHunterleave

Popular methods of IPirateHunter

  • getClientName
  • getPremium
  • setClientName
  • setPirateName
  • setPremium

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Option (scala)
  • From CI to AI: The AI layer in your organization
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