public Site findBestSite(Vector<Site> freeSites) {
    	// Your own code determining what the best Site is of all
        // possible freeSites for the agent to move to;
        Iterator<Site> i = freeSites.iterator();
        Site bestSite = new Site();
        double gain = Double.NEGATIVE_INFINITY;
        double newGain;
        if (i.hasNext()) {
            bestSite = i.next();
            gain = bestSite.getFood() - moveCost*pythagoras(this.xPosition, bestSite.getXPosition(), this.yPosition, bestSite.getYPosition());
        }
        while (i.hasNext()) {
            Site freeSite = i.next();
            newGain = freeSite.getFood()-moveCost*pythagoras(this.xPosition, freeSite.getXPosition(), this.yPosition, freeSite.getYPosition());
            if (newGain > gain) {
                bestSite = freeSite;
                gain = newGain;
            }
        }
        // Then return the best Site.
        return bestSite;
    }