Ich hab kein Bock mehr

This commit is contained in:
joachimschmidt557 2019-03-25 21:32:51 +01:00
parent c331208620
commit 6838a34e0d
3 changed files with 42 additions and 11 deletions

View file

@ -249,6 +249,7 @@ public class GameMap {
private List<Node<Castle>> allCastlesInRadius(Node<Castle> castle, List<Node<Castle>> allCastles, double r) {
return allCastles.stream()
.filter(x -> !x.equals(castle))
.filter(x -> x.getValue().distance(castle.getValue()) <= r)
.collect(Collectors.toList());