Package de.tum.cit.ase.maze.map.path
Class Node
java.lang.Object
de.tum.cit.ase.maze.map.path.Node
- All Implemented Interfaces:
Comparable<Node>
Node representing a "point" in a
Grid
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
float
getfCost()
float
getgCost()
float
gethCost()
com.badlogic.gdx.math.Vector2
boolean
void
setfCost
(float fCost) void
setgCost
(float gCost) void
sethCost
(float hCost) void
setNeighbors
(List<Node> neighbors) void
setObstacle
(boolean obstacle) void
void
setPosition
(com.badlogic.gdx.math.Vector2 position)
-
Constructor Details
-
Node
public Node(com.badlogic.gdx.math.Vector2 position, boolean isObstacle)
-
-
Method Details
-
calculateFCost
public void calculateFCost() -
getPosition
public com.badlogic.gdx.math.Vector2 getPosition() -
setPosition
public void setPosition(com.badlogic.gdx.math.Vector2 position) -
isObstacle
public boolean isObstacle() -
setObstacle
public void setObstacle(boolean obstacle) -
getgCost
public float getgCost() -
setgCost
public void setgCost(float gCost) -
gethCost
public float gethCost() -
sethCost
public void sethCost(float hCost) -
getfCost
public float getfCost() -
setfCost
public void setfCost(float fCost) -
getParent
-
setParent
-
getNeighbors
-
setNeighbors
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Node>
- Parameters:
o
- the object to be compared.- Returns:
-