package model;

import java.util.*;

import generators.*;

/**
 * The collection of food in the current maze.
 * @author cryingshadow
 */
public class Food {

    /**
     * The food.
     */
    private final Collection<Position> food;

    /**
     * @param food The food;
     */
    public Food(final Collection<Position> food) {
        this.food = food;
    }

    /**
     * @param foodGenerator
     */
    public Food(final FoodGenerator foodGenerator) {
        this.food = new LinkedHashSet<Position>();
    }

    /**
     * @param maze
     */
    public void generateFood(final Maze maze) {
        // TODO Auto-generated method stub

    }

    /**
     * @return The food.
     */
    public Collection<Position> getFood() {
        return this.food;
    }

    /**
     * @param pos A position.
     * @return True if food is at the specified position.
     */
    public boolean isFood(final Position pos) {
        // TODO Auto-generated method stub
        return false;
    }

}

@@ -931,63 +931,96 @@
     
-// TODO Auto-generated method stub%0A        return false
+return this.food.stream().filter(foodPos -%3E foodPos.equals(pos)).findFirst().isPresent()
 ;%0A  

determine whether there is food