Ich hab kein Bock mehr
This commit is contained in:
parent
c331208620
commit
6838a34e0d
3 changed files with 42 additions and 11 deletions
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue