Skip to content

Commit

Permalink
some thingies
Browse files Browse the repository at this point in the history
  • Loading branch information
Abelkrijgtalles committed Jan 1, 2025
1 parent 04ffd9d commit 81e68c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,8 @@

package nl.abelkrijgtalles.mojangmaps.common.pathfinding;

import nl.abelkrijgtalles.mojangmaps.common.pathfinding.abstraction.Scorer;
public class AStar {

public class TwoDimensionalWaypointScorer implements Scorer<Waypoint> {

@Override
public double computeCost(Waypoint from, Waypoint to) {

double x = from.getPosition().x - to.getPosition().x;
double z = from.getPosition().z - to.getPosition().z;

return Math.sqrt(x * x + z * z);
}
// very empty...

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@

import nl.abelkrijgtalles.mojangmaps.common.pathfinding.abstraction.Scorer;

public class ThreeDimensionalWaypointScorer implements Scorer<Waypoint> {
public class WaypointScorer implements Scorer<Waypoint> {

// TODO: ADD PENALTIES FOR UNCLIMBABLE HEIGHTS AND STUFF LIKE THAT
@Override
public double computeCost(Waypoint from, Waypoint to) {

Expand Down

0 comments on commit 81e68c7

Please sign in to comment.