Loading src/main/java/fr/greyc/mad/framework/model/Environment.java +10 −0 Original line number Diff line number Diff line package fr.greyc.mad.framework.model; import java.util.Arrays; import java.util.List; public abstract class Environment { Loading Loading @@ -28,4 +29,13 @@ public abstract class Environment { } next(); } /** * Method to add one or more agent bodies to the environment. * * @param newBodies the bodies to add */ public void addBodies(AgentBody... newBodies) { Arrays.stream(newBodies).forEach(agentBody -> bodies.add(agentBody)); } } Loading
src/main/java/fr/greyc/mad/framework/model/Environment.java +10 −0 Original line number Diff line number Diff line package fr.greyc.mad.framework.model; import java.util.Arrays; import java.util.List; public abstract class Environment { Loading Loading @@ -28,4 +29,13 @@ public abstract class Environment { } next(); } /** * Method to add one or more agent bodies to the environment. * * @param newBodies the bodies to add */ public void addBodies(AgentBody... newBodies) { Arrays.stream(newBodies).forEach(agentBody -> bodies.add(agentBody)); } }