Tabnine Logo
AStarGraphProvider.isOnSea
Code IndexAdd Tabnine to your IDE (free)

How to use
isOnSea
method
in
ch.sahits.game.openpatrician.engine.sea.AStarGraphProvider

Best Java code snippets using ch.sahits.game.openpatrician.engine.sea.AStarGraphProvider.isOnSea (Showing top 3 results out of 315)

origin: ch.sahits.game/OpenPatricianDisplay

} else {
  final Point2D destination = new Point2D(unscaledX, unscaledY);
  if (aStarGraphService.isOnSea(destination)) {
    path = seafaringService.travelTo(vessel, destination);
origin: ch.sahits.game/OpenPatricianEngine

if (isOnSea(p)) {
  if (!graph.containsNode(p)) {
    graph.addNodeInternal(p);
origin: ch.sahits.game/OpenPatricianEngine

private void addEdges(Point2D from, Point2D to, boolean isCity, boolean initial) {
  if (isCity || isOnSea(to)) {
    if (!graph.containsNode(to)) {
      if (initial) {
        graph.addNodeInternal(to);
      } else {
        graph.addNode(to, true);
      }
    }
    heuristicProvider.getHeuristic();
    double weight = calculateWeight(from, to);
    if (initial) {
      graph.addEdgeInternal(from, to, weight);
    } else {
      graph.addEdge(from, to, weight);
    }
    weight = calculateWeight(to, from);
    if (initial) {
      graph.addEdgeInternal(to, from, weight);
    } else {
      graph.addEdge(to, from, weight);
    }
  }
}
ch.sahits.game.openpatrician.engine.seaAStarGraphProviderisOnSea

Popular methods of AStarGraphProvider

  • addDestinationPoint
    Add a new destination Node to the graph. The new point is added to the heuristic as target and to th
  • addDestinationPointInternal
  • addEdges
  • calculateWeight
  • getGraph
  • getPoint
  • getSegments
  • getTangentialSegments
  • initImage

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text plugins
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