small change

This commit is contained in:
2018-05-21 15:21:50 +02:00
parent aae6e2ce58
commit 902fb3b89d

View File

@@ -58,10 +58,10 @@ public class Team {
if (!canHaveAsWorm(worms)) throw new IllegalArgumentException();
Collection<Worm> wormCollection = getAllWormsOfTeam();
Arrays.stream(worms).forEach(w -> w.setTeam(this));
getAllWormsOfTeam().addAll(Arrays.asList(worms));
Arrays.stream(worms).forEach(w -> {
w.setTeam(this);
wormCollection.add(w);
});
}
/**