Codota Logo
AStarGraphProvider.isOnSea
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • setContentView (Activity)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JFrame (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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