small change
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user