Update von dem ganzen Projekt auf 1.1

This commit is contained in:
joachimschmidt557 2019-02-12 20:00:53 +01:00
parent f9c67cb2e0
commit 5574ea06ea
4 changed files with 25 additions and 7 deletions

View file

@ -1,6 +1,7 @@
package game.map;
import base.GraphAlgorithm;
import base.Node;
import base.Edge;
import base.Graph;
import game.Player;
@ -52,6 +53,12 @@ public class PathFinding extends GraphAlgorithm<Castle> {
}
}
@Override
protected boolean isPassable(Node<Castle> node) {
return node.getValue().getOwner() == currentPlayer;
}
public List<Edge<Castle>> getPath(Castle targetCastle) {
return this.getPath(getGraph().getNode(targetCastle));
}