Skip to content

Instantly share code, notes, and snippets.

Avatar

Marius Helf mhelf

View GitHub Profile
@mhelf
mhelf / GetPath.java
Last active Feb 8, 2020
Function to determine the path between to tiles in a 2D world.
View GetPath.java
/**
* Calculates the path between two tiles.
*
* @param dst The destination tile of the path
* @param start The start tile of the path
* @return A list containing all tiles of the found path
*/
public ArrayList<Tile> getPath(Tile dst, Tile start) {
closed.clear();
open.clear();
You can’t perform that action at this time.