small change
This commit is contained in:
@@ -58,10 +58,10 @@ public class Team {
|
|||||||
if (!canHaveAsWorm(worms)) throw new IllegalArgumentException();
|
if (!canHaveAsWorm(worms)) throw new IllegalArgumentException();
|
||||||
|
|
||||||
Collection<Worm> wormCollection = getAllWormsOfTeam();
|
Collection<Worm> wormCollection = getAllWormsOfTeam();
|
||||||
|
Arrays.stream(worms).forEach(w -> {
|
||||||
Arrays.stream(worms).forEach(w -> w.setTeam(this));
|
w.setTeam(this);
|
||||||
|
wormCollection.add(w);
|
||||||
getAllWormsOfTeam().addAll(Arrays.asList(worms));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user