/** 
 * @author Tamara Munzner
 * @date Wed Mar 31
 *
 * Start on BunnyHerd class. Again, design alternatives discussed. 
 */

public class BunnyHerd {

	private int maxBunnies;
	private String herdName;
	
	private int herdCount;
	private NamedBunny[] bunnies;
	
	public BunnyHerd(int maxBunnies, String herdName) {
		this.maxBunnies = maxBunnies;
		this.herdName = herdName;
		bunnies = new NamedBunny[maxBunnies];
		herdCount = 0;
	}
	public void addBunny(int xPos, int yPos, int carrots, String name) {
		if (herdCount < maxBunnies) {
			bunnies[herdCount] = new NamedBunny(xPos,yPos,carrots,name);
			herdCount++;
		}
		// error checking!
	}
	public void deleteBunny(String name) {
		for (int i=0; i < herdCount; i++) { // only have to check up to herdcount, not all the way to maxBunnies
			bunnies[i].getName().equals(name); // this line not complete yet!
			//String thisName = bunnies[i].getName();
			//thisName.equals(name);
			// also legal, just more verbose
			
			// todo: kill the bunny!!
		}
	}
}

