Commit 6fc7b04e authored by Gaële Simon's avatar Gaële Simon
Browse files

Merge branch 'main' of https://git.unicaen.fr/bruno.mermet/mad-framework into main

parents 79ea4334 7ff15937
Loading
Loading
Loading
Loading
+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 {
@@ -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));
	}
}