<commit_before>package main.model.critter;

import java.util.ArrayList;
import java.util.List;

import main.model.Vector2D;
import main.model.critter.CritterFactory;

/**
 * CritterManager keeps a reference and manipulates all initialized Critters
 * @author justin.bell
 * @version 0.2
 */
public class CritterManager {
	private List<Critter> critterList = new ArrayList<Critter>();
	
	/**
	 * adds a critter to the CritterManager's list
	 * @param level
	 * @param position
	 */
	public void addCritter(int level, Vector2D position) {
		Critter critter = CritterFactory.createRandomCritter(level);
		critter.setPosition(position);
		critterList.add(critter);
	}
	
	/**
	 * removes a Critter, critter, from the CritterManager's list
	 * @param critter
	 */
	public void removeCritter(Critter critter) {
		critterList.remove(critter);
	}
	
	/**
	 * gets the CritterManager's list of Critters
	 * @return
	 */
	public List<Critter> getCritters() {
		return critterList;
	}
	
	/**
	 * updates movement of critters according to one unit of time
	 */
	public void moveCritters() {
		for(Critter critter : critterList) {
			critter.move();
		}
	}
}<commit_msg>adds a method that counts the number of Critters in CritterManager<commit_after>package main.model.critter;

import java.util.ArrayList;
import java.util.List;

import main.model.Vector2D;
import main.model.critter.CritterFactory;

/**
 * CritterManager keeps a reference and manipulates all initialized Critters
 * @author justin.bell
 * @version 0.2
 */
public class CritterManager {
	private List<Critter> critterList = new ArrayList<Critter>();
	
	/**
	 * adds a critter to the CritterManager's list
	 * @param level
	 * @param position
	 */
	public void addCritter(int level, Vector2D position) {
		Critter critter = CritterFactory.createRandomCritter(level);
		critter.setPosition(position);
		critterList.add(critter);
	}
	
	/**
	 * removes a Critter, critter, from the CritterManager's list
	 * @param critter
	 */
	public void removeCritter(Critter critter) {
		critterList.remove(critter);
	}
	
	/**
	 * gets the CritterManager's list of Critters
	 * @return
	 */
	public List<Critter> getCritters() {
		return critterList;
	}
	
	/**
	 * updates movement of critters according to one unit of time
	 */
	public void moveCritters() {
		for(Critter critter : critterList) {
			critter.move();
		}
	}
	
	/**
	 * Return an int representing the numberof Critters in critterList
	 * @return number of Critters in critterList
	 */
	public int countCritters() {
		return critterList.size();
	}
}
{'fraction_non_alphanumeric': 0.10348882791062329, 'fraction_numerical': 0.0031360250882007056, 'mean_word_length': 3.9941291585127203, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2128693', 'n_tokens_mistral': 887, 'n_tokens_neox': 786, 'n_words': 224}