Pike.java 1.09 KiB
package pikelake.pikes;
import fr.cemagref.simaqualife.pilot.Pilot;
import pikelake.Cell;
import pikelake.Individual;
public class Pike extends Individual {
	private double ingestedFood=0.;
    public Pike(Pilot pilot, Cell cell) {
    	//TODO fix weight according to the weightAtAgeThreshold
        // Default value of weight at birth
    	this(pilot, cell, 0, 10.);
    public Pike(Pilot pilot, Cell cell, int age, double weight) {
        super(pilot, cell);
        this.age =age;
        this.weight = weight;
	public double getIngestedFood() {
		return ingestedFood;
	public void setIngestedFood(double ingestedFood) {
		this.ingestedFood = ingestedFood;
	public void addIngestedFood(double ingestedFood) {
		this.ingestedFood += ingestedFood;
	public double getSuitabilityForPike(Cell cell){
		if (cell.getPikes().size()>1)
			return 0.; // at least an other pike in the cell
		else
			return 1.; /////////////////////////////////////////////////////////
			//return((double) cell.getPreys().size()) * cell.getHabitatQuality(); // number of preys accessible